Browse Source

Merge pull request 'add Permissions-Policy' (#7) from Permissions_policy into master

Reviewed-on: https://git.disroot.org/Disroot-Ansible/nginx/pulls/7
Reviewed-by: muppeth <muppeth@no-reply@disroot.org>
Reviewed-by: antilopa <antilopa@no-reply@disroot.org>
pull/9/head
meaz 4 weeks ago
parent
commit
ac73da2014
  1. 6
      templates/etc/nginx/sites-available/core.j2

6
templates/etc/nginx/sites-available/core.j2

@ -8,7 +8,7 @@
{% block server_info %}
## SERVER INFO
server {
server {
server_name {% if item.name is string %}{{ item.name }}{% else %}{{ item.name | join(' ') }}{% endif %};
{% if item.proto == 'http' %}
listen {{ item.listen }} {% if nginx_default_vhost == item.name %} default_server{% endif %};
@ -49,6 +49,10 @@ server {
{% if item.headers is defined and item.headers == 'none' %}
{% else %}
## HEADERS
{% if item.permission_policy is defined and item.permission_policy == 'none' %}
{% else %}
add_header Permissions-Policy "geolocation=(),interest-cohort=()";
{% endif %}
{% if item.secure_site is defined %}
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;

Loading…
Cancel
Save