vhost_security.j2 570 B

1234567891011121314151617181920212223
  1. {% if ansible_controlled is defined and ansible_controlled != "" %}
  2. #
  3. # {{ ansible_controlled }}
  4. #
  5. {% endif %}
  6. #
  7. # Various security rules
  8. #
  9. {% if nginx_security_xframeoptions %}
  10. # Clickjacking protection
  11. add_header X-Frame-Options "sameorigin";
  12. {% endif %}
  13. {% if nginx_security_xxssprotection %}
  14. # Cross-site scripting (XSS) filter
  15. add_header X-XSS-Protection "1; mode=block";
  16. {% endif %}
  17. {% if nginx_security_xcontenttypeoptions %}
  18. # Prevents from MIME-sniffing a response away from the declared content-type
  19. add_header X-Content-Type-Options "nosniff";
  20. {% endif %}