-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: env keyword highlights (#1015) * refactor: creatable multi select * refactor: update colors * docs: test suite step docs link (#1023) * docs: test suite step docs link * fix lint --------- Co-authored-by: Bogdan Hanea <[email protected]> * docs: update link to test suite steps (#1024) * Update README.md * ci: add dispatch (#1025) * add dispatch to CI workflow * feat: logs v2 (#1027) * refactor: add nginx security headers (#1029) * refactor: add nginx security headers * chore: update conf * refactor: configurable security headers * refactor: security script changes * refactor: use API_HOST --------- Co-authored-by: Razvan Topliceanu <[email protected]> Co-authored-by: Lilla Vass <[email protected]> Co-authored-by: Bogdan Hanea <[email protected]> Co-authored-by: ypoplavs <[email protected]>
- Loading branch information
1 parent
c9ef9d7
commit 9e07de1
Showing
3 changed files
with
26 additions
and
0 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
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,21 @@ | ||
#!/bin/sh | ||
|
||
API_HOST=$(echo $REACT_APP_API_SERVER_ENDPOINT | sed -e 's|http://||g' -e 's|https://||g') | ||
|
||
tempFile=$(mktemp /etc/nginx/tempfile.XXXXXXXX) | ||
|
||
cat > "${tempFile}" <<EOF | ||
add_header X-Frame-Options "SAMEORIGIN"; | ||
add_header X-Content-Type-Options "nosniff"; | ||
add_header Referrer-Policy "strict-origin-when-cross-origin"; | ||
add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self' http://${API_HOST} https://${API_HOST} ws://${API_HOST} wss://${API_HOST} blob:;"; | ||
EOF | ||
|
||
if [ "${ENABLE_SECURITY_HEADERS}" = "true" ]; then | ||
sed -i "/#SecurityHeaders/r ${tempFile}" /etc/nginx/nginx.conf.tmpl | ||
fi | ||
|
||
rm "${tempFile}" | ||
|
||
cat /etc/nginx/nginx.conf.tmpl |