vhost_security.j2 580 B

12345678910111213141516171819202122
  1. {% if ansible_prolog -%}
  2. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  3. {{ prolog() }}
  4. {% endif -%}
  5. #
  6. # Various security rules
  7. #
  8. {% if nginx_security_xframeoptions %}
  9. # Clickjacking protection
  10. add_header X-Frame-Options "sameorigin";
  11. {% endif %}
  12. {% if nginx_security_xxssprotection %}
  13. # Cross-site scripting (XSS) filter
  14. add_header X-XSS-Protection "1; mode=block";
  15. {% endif %}
  16. {% if nginx_security_xcontenttypeoptions %}
  17. # Prevents from MIME-sniffing a response away from the declared content-type
  18. add_header X-Content-Type-Options "nosniff";
  19. {% endif %}