Adding bigpipe support to nginx.

pull/63/head
Ivan Grynenko 8 years ago
parent f6a03f8812
commit bcc1e84553
  1. 10
      tasks/main.yml
  2. 7
      templates/headers.conf.j2

@ -35,5 +35,15 @@
notify:
- reload nginx
- name: Copy headers config file in place.
template:
src: headers.conf.j2
dest: "{{ nginx_conf_file_path }}/conf.d"
owner: root
group: "{{ root_group }}"
mode: 0644
notify:
- reload nginx
- name: Ensure nginx is started and enabled to start at boot.
service: name=nginx state=started enabled=yes

@ -0,0 +1,7 @@
{% if nginx_bigpipe_enable %}
add_header X-Accel-Buffering: no;
{% endif %}
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://assets.zendesk.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com https://assets.zendesk.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://assets.zendesk.com; font-src 'self' https://themes.googleusercontent.com; frame-src https://assets.zendesk.com https://www.facebook.com https://s-static.ak.facebook.com https://tautt.zendesk.com; object-src 'none'";