File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ CLEAN_URLs="${clean_urls:-false}"
7474DEPLOY_BUCKET_NAME=" ${CUBOS_DEV_SITE_DEPLOY_BUCKET:- cubos-dev-sites} "
7575DEPLOY_CLUSTER=" ${CUBOS_DEV_SITE_DEPLOY_CLUSTER:- CUBOS_DEV} "
7676CUSTOM_NGINX_RULES=" ${custom_nginx_rules} "
77+ CUSTOM_CSP_RULES=" ${custom_csp_rules:- frame-ancestors ' self' ;} "
7778
7879if [ " ${force_firebase_deploy} " = " true" ] || ([ " ${trunk_based} " != " true" ] && ([ " ${CI_COMMIT_REF_NAME} " = " master" ] || [ " ${CI_COMMIT_REF_NAME} " = " main" ])); then
7980 echo -e " \033[95mDEPLOYING TO:"
@@ -98,6 +99,10 @@ if [ "${force_firebase_deploy}" = "true" ] || ([ "${trunk_based}" != "true" ] &&
9899 {
99100 "key": "Cache-Control",
100101 "value": "max-age=900, stale-while-revalidate=180"
102+ },
103+ {
104+ "key": "Content-Security-Policy",
105+ "value": "${CUSTOM_CSP_RULES} "
101106 }
102107 ]
103108 },
@@ -255,6 +260,7 @@ metadata:
255260 proxy_hide_header vary;
256261 proxy_hide_header cache-control;
257262 add_header cache-control "no-cache, no-store, must-revalidate";
263+ add_header content-security-policy "${CUSTOM_CSP_RULES} ";
258264$( echo " $CUSTOM_NGINX_RULES " | sed ' s/^/ /' )
259265 ${NGINX_RULE_ERROR_PAGE}
260266spec:
You can’t perform that action at this time.
0 commit comments