Advertisement
Guest User

Untitled

a guest
Nov 5th, 2016
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. # prepare for letsencrypt
  2. # https://community.centminmod.com/posts/17774/
  3. location ~ /.well-known {
  4. location ~ /.well-known/acme-challenge/(.*) {
  5. more_set_headers "Content-Type: text/plain";
  6. }
  7. }
  8.  
  9. location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
  10. gzip_static off;
  11. #add_header Pragma public;
  12. #add_header X-Frame-Options SAMEORIGIN;
  13. #add_header X-Xss-Protection "1; mode=block" always;
  14. #add_header X-Content-Type-Options "nosniff" always;
  15. add_header Access-Control-Allow-Origin *;
  16. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  17. access_log off;
  18. expires 30d;
  19. break;
  20. }
  21.  
  22. location ~* \.(js)$ {
  23. #add_header Pragma public;
  24. #add_header X-Frame-Options SAMEORIGIN;
  25. #add_header X-Xss-Protection "1; mode=block" always;
  26. #add_header X-Content-Type-Options "nosniff" always;
  27. add_header Access-Control-Allow-Origin *;
  28. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  29. access_log off;
  30. expires 30d;
  31. break;
  32. }
  33.  
  34. location ~* \.(css)$ {
  35. #add_header Pragma public;
  36. #add_header X-Frame-Options SAMEORIGIN;
  37. #add_header X-Xss-Protection "1; mode=block" always;
  38. #add_header X-Content-Type-Options "nosniff" always;
  39. add_header Access-Control-Allow-Origin *;
  40. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  41. access_log off;
  42. expires 30d;
  43. break;
  44. }
  45.  
  46. location ~* \.(html|htm|txt)$ {
  47. if ($server_https = 'on') {
  48. add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
  49. }
  50. #add_header Pragma public;
  51. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  52. access_log off;
  53. expires 30m;
  54. break;
  55. }
  56.  
  57. location ~* \.(eot|svg|ttf|woff|woff2)$ {
  58. #add_header Pragma public;
  59. #add_header X-Frame-Options SAMEORIGIN;
  60. #add_header X-Xss-Protection "1; mode=block" always;
  61. #add_header X-Content-Type-Options "nosniff" always;
  62. add_header Access-Control-Allow-Origin *;
  63. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  64. access_log off;
  65. expires 30d;
  66. break;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement