Does nginx pay any attention to http headers returned from a CGI program/script?
Specifically, I'd like the CGI to be able to generate appropriate http response headers, but it seems to me that nginx ignores these and just sends a 200 OK response when it actually finds the CGI file. I was hoping I could create a 301/2 redirect header to be sent back to the original requestor, however that instead just receives a 200 OK and nothing else.
Even if I cannot construct a redirect in this way, the CGI may not be able to create a response, depending on the query parameters it has been passed and so needs to be able to return an appropriate error that can be passed back to the original requestor.
Is there any way to tell nginx to simply pass on the http headers, as generated by the CGI? How else can the CGI respond that it cannot process the supplied query parameters?