This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-147
lines changed
roles/stackhead_setup/tasks Expand file tree Collapse file tree 3 files changed +23
-147
lines changed Original file line number Diff line number Diff line change 2
2
version : v2.0.0
3
3
- name : robertdebock.python_pip
4
4
version : 3.3.0
5
- - name : geerlingguy .nginx
6
- version : 2.8 .0
5
+ - name : nginxinc .nginx
6
+ version : 0.14 .0
7
7
- name : geerlingguy.php
8
8
version : 4.4.0
9
9
- name : geerlingguy.php-versions
Original file line number Diff line number Diff line change 5
5
dest : /etc/nginx
6
6
- name : Setup Nginx
7
7
vars :
8
- nginx_ppa_use : true
9
- nginx_conf_template : " {{ stackhead__templates }}/nginx.conf.j2"
10
- nginx_vhosts : []
11
- __nginx_user : " stackhead"
12
- root_group : " stackhead"
8
+ nginx_main_template_enable : 1
9
+ nginx_html_demo_template_enable : 1
10
+ nginx_main_template :
11
+ user : " stackhead"
12
+ http_custom_options :
13
+ # Add X-XSS-Protection for HTML documents. /etc/nginx/h5bp/security/x-xss-protection.conf
14
+ - " map $sent_http_content_type $x_xss_protection {\n ~*text/html \" 1; mode=block\" ;\n }"
15
+ # Add X-Frame-Options for HTML documents. /etc/nginx/h5bp/security/x-frame-options.conf
16
+ - " map $sent_http_content_type $x_frame_options {\n ~*text/html DENY;\n }"
17
+ # Add Content-Security-Policy for HTML documents. /etc/nginx/h5bp/security/content-security-policy.conf
18
+ - " map $sent_http_content_type $content_security_policy {\n ~*text/html \" default-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests\" ;\n }"
19
+ # Add Referrer-Policy for HTML documents. /etc/nginx/h5bp/security/referrer-policy.conf.conf
20
+ - " map $sent_http_content_type $referrer_policy {\n ~*text/html \" strict-origin-when-cross-origin\" ;\n }"
21
+ # Add X-UA-Compatible for HTML documents. /etc/nginx/h5bp/internet_explorer/x-ua-compatible.conf
22
+ - " map $sent_http_content_type $x_ua_compatible {\n ~*text/html \" IE=edge\" ;\n }"
23
+ # Add Access-Control-Allow-Origin. /etc/nginx/h5bp/cross-origin/requests.conf
24
+ - " map $sent_http_content_type $cors {\n ~*image/ \" *\" ;\n ~*font/ \" *\" ;\n ~*application/vnd.ms-fontobject \" *\" ;\n ~*application/x-font-ttf \" *\" ;\n ~*application/font-woff \" *\" ;\n ~*application/x-font-woff \" *\" ;\n ~*application/font-woff2 \" *\" ;\n }"
25
+ http_custom_includes :
26
+ - /etc/nginx/h5bp/web_performance/compression.conf
27
+ - /etc/nginx/h5bp/web_performance/cache_expiration.conf
13
28
include_role :
14
- name : geerlingguy .nginx
29
+ name : nginxinc .nginx
15
30
- name : adjust owner of /var/www directories
16
31
file :
17
32
path : /var/www
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments