3

I have the following location block in my server block in /etc/sites-available/example.com:

    location ~* \.(ttf|woff|woff2|eot|mp4|css|gif|ico|jpeg|jpg|js|png)$ {
            expires max;
            log_not_found off;
    }

and this under /etc/nginx/mime.types:

types {
...
application/x-font-ttf ttc ttf;
application/x-font-otf otf;
application/font-woff woff;
application/font-woff2 woff2;
application/vnd.ms-fontobject eot;
...
}

First of all, response header content-type does not seem to change. For example, for ttf it shows application/octet-stream.

Most importantly, expires headers are missing. Any tips?

geochanto
  • 157
  • 9

1 Answers1

1

Silly me. Chrome devtools was serving me resources from cache even though I had cleared cache in chrome. I needed to disable cache under the network tab. Everything works.

geochanto
  • 157
  • 9