3

When I use ngx.say() in Lua, to output something, it starts downloading in browser. Try this url - http://162.241.200.114

I don't know what I'm supposed to do to fix this

Also how to check the domain name and subdomain for the request using Lua.

Dean
  • 427
  • 1
  • 4
  • 8
  • Please show your nginx.conf and the rest of the code. Without them, there is not much anyone can say. – Kousha Apr 15 '19 at 17:40

1 Answers1

4

the default headers for openresty defines content-type as octet-stream. changing header with ngx.header['content-type'] = 'text/html' Fixed it

Dean
  • 427
  • 1
  • 4
  • 8