This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from beabee-communityrm/feat/csp
feat: add support for embedding for global gzip
- Loading branch information
Showing
4 changed files
with
36 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
# This script converts the TRUSTED_ORIGINS variable from the comma | ||
# separated format beabee expects for lists, to the space separated | ||
# on that the Content-Security-Policy header exports. | ||
# It must be ahead of 20-envsubst-on-templates.sh | ||
|
||
TRUSTED_ORIGINS=${TRUSTED_ORIGINS//,/ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
FROM nginx:1.24-alpine | ||
|
||
COPY 15-trusted-origins.envsh /docker-entrypoint.d/ | ||
COPY sec_headers /etc/nginx/sec_headers | ||
COPY nginx.conf /etc/nginx/templates/default.conf.template | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"; | ||
add_header X-XSS-Protection "1; mode=block"; | ||
add_header X-Content-Type-Options "nosniff"; | ||
add_header Referrer-Policy "strict-origin"; |