Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Set expires for static files
- location ~* \.(?:css|js|ico|svg)$ {
- add_header Cache-Control "max-age=2678400, public";
- }
- # Web fonts needs some special care
- # Reference: http://jmoiron.net/blog/serving-fonts-aws-cloudfront/
- location ~* \.(?:ttf|eot|woff|otf)$ {
- ### Comment the following line, if you do NOT use an external URL to serve webfonts
- add_header Access-Control-Allow-Origin "*";
- add_header Cache-Control "max-age=2678400, public";
- }
- # Referers for images
- location ~ \.(?:jpg|jpeg|gif|png)$ {
- ### Please change the domainname before uncommenting the following
- # valid_referers none blocked www.domainname.com domainname.com;
- # if ($invalid_referer) { return 403; }
- add_header Cache-Control "max-age=2678400, public";
- }
- # The rewrite magic
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement