Hi.
I need set some fascgi_* inside “if” block. E.g.:
if ($foo = “bar”) {
fastcgi_ignore_headers “Set-Cookie”;
}
But the error is occure on configtest stage:
nginx: [emerg] “fastcgi_ignore_headers” directive is not allowed here
Is there any workaround?
–
Cheers,
Vitaliy
Hello!
On Sun, Mar 08, 2015 at 12:10:04PM +0200, wishmaster wrote:
nginx: [emerg] “fastcgi_ignore_headers” directive is not allowed here
Is there any workaround?
See these article for general hints:
In this particular case, it should also be possible to use
fastcgi_ignore_headers unconditionally, with appropriate
fastcgi_no_cache additionally configured (see
Module ngx_http_fastcgi_module for details).
–
Maxim D.
http://nginx.org/