I have an nginx setup with multiple server blocks. I'd like to know if there's a way to globally set the value of expires
to max
for all images, CSS and JS across the server.
I know I can use this:
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires max;
}
But then I'd have to add it to every server block, since location
isn't allowed in http
.
Is there a way to set expires
to max
for specific mime-types or extensions, globally?