I have my static assets configured as
location @upstream {
proxy_pass http://localhost:82;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
try_files $uri @upstream;
access_log off;
expires max;
add_header Cache-Control public;
}
The expires max is not respected.
I think its respecting the incoming server header.
How can modify this to set expires header?