File tree Expand file tree Collapse file tree 17 files changed +19
-19
lines changed
Expand file tree Collapse file tree 17 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ Images with `nginx` can be configured using the following environment variables.
2222### Content Security Policy
2323
2424You can control the CSP behaviour with the ` NGINX_CSP_MODE ` key:
25- - ` enforce ` (default) : Configure the ` Content-Security-Policy ` header.
26- - ` report-only ` : Instead configure the ` Content-Security-Policy-Report-Only ` header.
25+ - ` enforce ` : Configure the ` Content-Security-Policy ` header.
26+ - ` report-only ` (default) : Instead configure the ` Content-Security-Policy-Report-Only ` header.
2727
2828Note: the following fetch & navigation CSP keys can also be set via an embedded file located at ` /etc/csp-generator/default ` .
2929
Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ set -euo pipefail
1414# `NGINX_CSP_…`, like `NGINX_CSP_CHILD_SRC`.
1515#
1616# Inputs (aside from all the individual CSP settings):
17- # - NGINX_CSP_MODE: defaults to 'enforce '
17+ # - NGINX_CSP_MODE: defaults to 'report-only '
1818# - NGINX_CSP_REPORT_URI: defaults to ''
1919# - NGINX_FRAME_OPTIONS: defaults to 'deny', note that setting to `disable` removes the header completely.
2020
2121# Set defaults
2222NGINX_CONFIG_FILE=' /etc/nginx/snippets/vars/csp-and-robots.conf'
2323NGINX_CSP_ITEMS=' child-src connect-src font-src form-action frame-ancestors frame-src img-src manifest-src media-src object-src require-trusted-types-for script-src style-src trusted-types worker-src'
24- NGINX_CSP_MODE=" ${NGINX_CSP_MODE:- enforce } "
24+ NGINX_CSP_MODE=" ${NGINX_CSP_MODE:- report-only } "
2525NGINX_CSP_REPORT_URI=" ${NGINX_CSP_REPORT_URI:- } "
2626NGINX_FRAME_OPTIONS=" ${NGINX_FRAME_OPTIONS:- deny} "
2727
Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ NGINX_CSP_STYLE_SRC="https://styles.environment.com data: 'unsafe-inline'"
1414NGINX_CSP_TRUSTED_TYPES =" environment-foo env-bar"
1515NGINX_CSP_WORKER_SRC =" https://workers.environment.com data:"
1616
17- NGINX_CSP_MODE =report-only
17+ NGINX_CSP_MODE =enforce
1818NGINX_CSP_REPORT_URI =https://sentry.appwi.se/api/347/security/?sentry_key =foo123
1919NGINX_FRAME_OPTIONS =sameorigin
Original file line number Diff line number Diff line change 33 check envs and secrets :
44 headers :
55 - >-
6- Content-Security-Policy-Report-Only :
6+ Content-Security-Policy:
77 default-src 'self';
88 child-src https://children.embedded.com 'self' https://children.environment.com data:;
99 connect-src https://connection.embedded.com 'self' https://connection.environment.com data:;
Original file line number Diff line number Diff line change 55 body :
66 - ' Hey from index.mjs'
77 headers :
8- - ' Content-Security-Policy: default-src '' self'' ;'
8+ - ' Content-Security-Policy-Report-Only : default-src '' self'' ;'
99 - ' Cross-Origin-Opener-Policy: same-origin'
1010 - ' Cross-Origin-Resource-Policy: same-origin'
1111 - ' Permissions-Policy: interest-cohort=()'
Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ NGINX_CSP_STYLE_SRC="https://styles.environment.com data: 'unsafe-inline'"
1414NGINX_CSP_TRUSTED_TYPES =" environment-foo env-bar"
1515NGINX_CSP_WORKER_SRC =" https://workers.environment.com data:"
1616
17- NGINX_CSP_MODE =report-only
17+ NGINX_CSP_MODE =enforce
1818NGINX_CSP_REPORT_URI =https://sentry.appwi.se/api/347/security/?sentry_key =foo123
1919NGINX_FRAME_OPTIONS =sameorigin
Original file line number Diff line number Diff line change 33 check envs and secrets :
44 headers :
55 - >-
6- Content-Security-Policy-Report-Only :
6+ Content-Security-Policy:
77 default-src 'self';
88 child-src https://children.embedded.com 'self' https://children.environment.com data:;
99 connect-src https://connection.embedded.com 'self' https://connection.environment.com data:;
Original file line number Diff line number Diff line change 55 body :
66 - ' Hey from server.js'
77 headers :
8- - ' Content-Security-Policy: default-src '' self'' ;'
8+ - ' Content-Security-Policy-Report-Only : default-src '' self'' ;'
99 - ' Cross-Origin-Opener-Policy: same-origin'
1010 - ' Cross-Origin-Resource-Policy: same-origin'
1111 - ' Permissions-Policy: interest-cohort=()'
Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ NGINX_CSP_STYLE_SRC="https://styles.environment.com data: 'unsafe-inline'"
1414NGINX_CSP_TRUSTED_TYPES =" environment-foo env-bar"
1515NGINX_CSP_WORKER_SRC =" https://workers.environment.com data:"
1616
17- NGINX_CSP_MODE =report-only
17+ NGINX_CSP_MODE =enforce
1818NGINX_CSP_REPORT_URI =https://sentry.appwi.se/api/347/security/?sentry_key =foo123
1919NGINX_FRAME_OPTIONS =sameorigin
Original file line number Diff line number Diff line change 33 check envs and secrets :
44 headers :
55 - >-
6- Content-Security-Policy-Report-Only :
6+ Content-Security-Policy:
77 default-src 'self';
88 child-src https://children.embedded.com 'self' https://children.environment.com data:;
99 connect-src https://connection.embedded.com 'self' https://connection.environment.com data:;
You can’t perform that action at this time.
0 commit comments