security_headers.conf.j2 652 B

1234567891011121314151617
  1. # Managed by Ansible — do not edit manually
  2. server_tokens off;
  3. # Rate limiting zone definition
  4. limit_req_zone {{ nginx_rate_limit_req_zone }};
  5. # Client body size limit
  6. client_max_body_size {{ nginx_client_max_body_size }};
  7. # Security headers
  8. add_header Strict-Transport-Security "max-age={{ nginx_hsts_max_age }}; includeSubDomains; preload" always;
  9. add_header X-Frame-Options SAMEORIGIN always;
  10. add_header X-Content-Type-Options nosniff always;
  11. add_header Referrer-Policy strict-origin-when-cross-origin always;
  12. add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
  13. add_header X-XSS-Protection "1; mode=block" always;