mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
add a reasonable default Content Security Policy
ideally we'd improve this over time to remove the `unsafe-inline` lines, but we can't due that today because Angular1 makes use of a lot of inline <script> and <style> tag generation see: https://github.com/ansible/awx/issues/2056
This commit is contained in:
@@ -22,6 +22,8 @@ server {
|
||||
|
||||
# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
|
||||
add_header Strict-Transport-Security max-age=15768000;
|
||||
add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' cdn.pendo.io; report-uri /csp-violation/";
|
||||
add_header X-Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' cdn.pendo.io; report-uri /csp-violation/";
|
||||
|
||||
location /static/ {
|
||||
root /awx_devel;
|
||||
@@ -82,6 +84,8 @@ server {
|
||||
|
||||
# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
|
||||
add_header Strict-Transport-Security max-age=15768000;
|
||||
add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' cdn.pendo.io; report-uri /csp-violation/";
|
||||
add_header X-Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' cdn.pendo.io; report-uri /csp-violation/";
|
||||
|
||||
location /static/ {
|
||||
root /awx_devel;
|
||||
|
||||
Reference in New Issue
Block a user