Advertisement
Guest User

/etc/nginx/conf.d/common.conf

a guest
Mar 22nd, 2024
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.53 KB | None | 0 0
  1. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
  2. add_header X-Frame-Options "SAMEORIGIN" always;
  3. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
  4. add_header X-XSS-Protection "1; mode=block" always;
  5. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
  6. add_header X-Content-Type-Options "nosniff" always;
  7. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
  8. add_header Referrer-Policy "no-referrer" always;
  9. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
  10. add_header X-Download-Options "noopen" always;
  11. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
  12. add_header X-Permitted-Cross-Domain-Policies "none" always;
  13. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
  14. add_header X-Robots-Tag "noindex, nofollow" always;
  15. # https://nginx.org/en/docs/http/ngx_http_core_module.html#server_tokens
  16. server_tokens off;
  17. # https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip
  18. gzip on;
  19. # https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_vary
  20. gzip_vary on;
  21. # https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_comp_level
  22. gzip_comp_level 4;
  23. # https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_min_length
  24. gzip_min_length 256;
  25. # https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_proxied
  26. gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
  27. # https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_types
  28. gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
  29. # https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
  30. client_max_body_size 512M;
  31. # https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_buffers
  32. fastcgi_buffers 64 4K;
  33. # https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_hide_header
  34. fastcgi_hide_header X-Powered-By;
  35. # https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_buffer_size
  36. client_body_buffer_size 512k;
  37. # https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout
  38. client_body_timeout 300s;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement