# Keep the upstream CSP and add only the directives the DEV frames need. map $upstream_http_content_security_policy $embedded_site_policy { default ""; "~^(.+)$" "$1; frame-src @CORE@ @HEALTH@ @BEACON@"; } map $upstream_http_content_security_policy $embedded_health_policy { default $upstream_http_content_security_policy; "~^(?.*;\s*)frame-ancestors 'none'(?;.*|$)$" "$health_csp_start frame-ancestors @SITE@$health_csp_end"; } map $upstream_http_content_security_policy $embedded_health_frame_options { default DENY; "~;\s*frame-ancestors 'none'(;|$)" ""; } # Browsers share cookies across ports on a host. Forward only the Health Check # cookies to Health Check. Keep website owner cookies out of CoreScope and Beacon. map "$cookie_mesh_health_turnstile:$cookie_mesh_health_turnstile_ws" $health_cookies { ":" ""; default "mesh_health_turnstile=$cookie_mesh_health_turnstile; mesh_health_turnstile_ws=$cookie_mesh_health_turnstile_ws"; } map $server_port $lan_proxy_cookie { default $http_cookie; @CORE_PORT@ $core_cookies; @HEALTH_PORT@ $health_cookies; @BEACON_PORT@ ""; } map $cookie_cs_session $core_cookies { "" ""; default "cs_session=$cookie_cs_session"; }