Kaspars Dambis
2009-09-18 15:42:39 UTC
I have two php scripts (css.php and js.php) which combine all css and js
files. To make things faster on the client side, I want to
- set expires header to far future
- not set cookies for those request
Here is what works now:
location ~ \.php$ {
# php cgi stuff goes here
if ($request_uri ~ (css|js)\.php) {
expires max;
}
}
location ~ (css|js)\.php {
fastcgi_hide_header Set-Cookie;
}
The question is -- why it's not allowed to use *fastcgi_hide_header
Set-Cookie;* inside the if () { ... } statement?
Regards,
Kaspars
files. To make things faster on the client side, I want to
- set expires header to far future
- not set cookies for those request
Here is what works now:
location ~ \.php$ {
# php cgi stuff goes here
if ($request_uri ~ (css|js)\.php) {
expires max;
}
}
location ~ (css|js)\.php {
fastcgi_hide_header Set-Cookie;
}
The question is -- why it's not allowed to use *fastcgi_hide_header
Set-Cookie;* inside the if () { ... } statement?
Regards,
Kaspars