Skip to content

Commit 20bd0b9

Browse files
committed
MAGETWO-43510: x-frame-options missing from setup
- add missing header to static file request urls
1 parent 97ebf98 commit 20bd0b9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nginx.conf.sample

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ location /setup {
3434
fastcgi_index index.php;
3535
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
3636
include fastcgi_params;
37+
add_header X-Frame-Options "SAMEORIGIN"
3738
}
3839

3940
location ~ ^/setup/(?!pub/). {
@@ -50,12 +51,14 @@ location /update {
5051
fastcgi_index index.php;
5152
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
5253
include fastcgi_params;
54+
add_header X-Frame-Options "SAMEORIGIN"
5355
}
5456

5557
# deny everything but index.php
5658
location ~ ^/update/(?!pub/). {
5759
deny all;
5860
}
61+
add_header X-Frame-Options "SAMEORIGIN"
5962
}
6063

6164
location / {
@@ -76,6 +79,7 @@ location /static/ {
7679
}
7780
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
7881
add_header Cache-Control "public";
82+
add_header X-Frame-Options "SAMEORIGIN"
7983
expires +1y;
8084

8185
if (!-f $request_filename) {
@@ -84,6 +88,7 @@ location /static/ {
8488
}
8589
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
8690
add_header Cache-Control "no-store";
91+
add_header X-Frame-Options "SAMEORIGIN"
8792
expires off;
8893

8994
if (!-f $request_filename) {
@@ -105,11 +110,13 @@ location /media/ {
105110

106111
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
107112
add_header Cache-Control "public";
113+
add_header X-Frame-Options "SAMEORIGIN"
108114
expires +1y;
109115
try_files $uri $uri/ /get.php?$args;
110116
}
111117
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
112118
add_header Cache-Control "no-store";
119+
add_header X-Frame-Options "SAMEORIGIN"
113120
expires off;
114121
try_files $uri $uri/ /get.php?$args;
115122
}

0 commit comments

Comments
 (0)