add_header not allowed in server if blocks?

steveh nginx-forum at
Tue Jun 15 04:29:05 MSD 2010

Hmm ok so it seems I was bitten by some unpredictable behaviour in gcf and this doesn't actually work.

Setting just: add_header X-UA-Compatible "chrome=1"; in the server block or in an if within every location-if works but that's not ideal.

Any ideas why add_header within a server-if doesn't work as expected?

Posted at Nginx Forum:,98202,98224#msg-98224

More information about the nginx mailing list