fix(nginx):embed iframe x-frame-options
This commit is contained in:
+12
-1
@@ -45,6 +45,17 @@ server {
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
}
|
||||
|
||||
# Internal fallback target for /embed/* routes. Keep it separate from the
|
||||
# main SPA location so embed pages do not inherit X-Frame-Options.
|
||||
location = /embed.html {
|
||||
internal;
|
||||
root /usr/share/nginx/html;
|
||||
add_header Cache-Control "no-cache, must-revalidate" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
}
|
||||
|
||||
# Embed widget pages may be loaded inside third-party iframes (lightweight embed.html)
|
||||
location ^~ /embed/ {
|
||||
root /usr/share/nginx/html;
|
||||
@@ -121,4 +132,4 @@ server {
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user