Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS-743 Move from X-Frame-Options to Content-Security-Policy: frame-an… #498

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion expose/api/docker/nginx/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

envsubst '$UPLOAD_MAX_FILE_SIZE,$PS_SUBNET' < /etc/nginx/tpl/default.conf > /etc/nginx/conf.d/default.conf
envsubst '${UPLOAD_MAX_FILE_SIZE},${PS_SUBNET},${DASHBOARD_CLIENT_URL}' < /etc/nginx/tpl/default.conf > /etc/nginx/conf.d/default.conf

exec "$@"
2 changes: 1 addition & 1 deletion expose/api/docker/nginx/tpl/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ server {

add_header X-Robots-Tag "noindex, nofollow";
add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "deny";
add_header Content-Security-Policy "frame-ancestors 'self' ${DASHBOARD_CLIENT_URL}";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";

client_max_body_size $UPLOAD_MAX_FILE_SIZE;
Expand Down
1 change: 1 addition & 0 deletions infra/docker/nginx-client-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN apk update \

COPY entrypoint.sh /entrypoint.sh
COPY nginx/conf.d/* /etc/nginx/conf.d/
COPY tpl /etc/nginx/tpl

EXPOSE 80

Expand Down
2 changes: 2 additions & 0 deletions infra/docker/nginx-client-base/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ if [ -d /docker/entrypoint.d ]; then
unset i
fi

envsubst '${DASHBOARD_CLIENT_URL}' < /etc/nginx/tpl/default.conf > /etc/nginx/conf.d/default.conf

exec "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ server {

add_header X-Robots-Tag "noindex, nofollow";
add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "deny";
add_header Content-Security-Policy "frame-ancestors 'self' ${DASHBOARD_CLIENT_URL}";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";

root /var/app;
Expand Down
2 changes: 1 addition & 1 deletion infra/docker/nginx-fpm-base/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

envsubst '${FPM_HOSTNAME} ${UPLOAD_MAX_FILE_SIZE}' < /etc/nginx/tpl/default.conf > /etc/nginx/conf.d/default.conf
envsubst '${FPM_HOSTNAME},${UPLOAD_MAX_FILE_SIZE},${DASHBOARD_CLIENT_URL}' < /etc/nginx/tpl/default.conf > /etc/nginx/conf.d/default.conf

exec "$@"
2 changes: 1 addition & 1 deletion infra/docker/nginx-fpm-base/tpl/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ server {

add_header X-Robots-Tag "noindex, nofollow";
add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "deny";
add_header Content-Security-Policy "frame-ancestors 'self' ${DASHBOARD_CLIENT_URL}";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";

location / {
Expand Down
Loading