回答編集履歴
1
追記
test
CHANGED
@@ -49,3 +49,75 @@
|
|
49
49
|
add_header X-Frame-Options "ALLOW";
|
50
50
|
|
51
51
|
```
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
アプリケーションとのコンフリクトに注意
|
56
|
+
|
57
|
+
-----
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
アプリケーション側でX-Frame-Optionsを付け足す設定になっている場合があり、
|
62
|
+
|
63
|
+
自分の場合は[Ruby on RailsがデフォルトでSAMEORIGINを返すようになっていた](https://programming.wikihub.io/@r7kamura/20160617011257)ため、
|
64
|
+
|
65
|
+
Chromeではコンフリクトエラーが発生。
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
>エラー
|
70
|
+
|
71
|
+
```
|
72
|
+
|
73
|
+
Refused to display 'https://hoge.com' in a frame because it set multiple 'X-Frame-Options' headers with conflicting values ('SAMEORIGIN, ALLOW'). Falling back to 'deny'
|
74
|
+
|
75
|
+
```
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
>ヘッダ
|
80
|
+
|
81
|
+
```
|
82
|
+
|
83
|
+
* Server nginx/1.10.1 is not blacklisted
|
84
|
+
|
85
|
+
< Server: nginx/1.10.1
|
86
|
+
|
87
|
+
< Date: Thu, 01 Feb 2018 23:59:11 GMT
|
88
|
+
|
89
|
+
< Content-Type: text/html; charset=utf-8
|
90
|
+
|
91
|
+
< Transfer-Encoding: chunked
|
92
|
+
|
93
|
+
< Connection: keep-alive
|
94
|
+
|
95
|
+
< X-Frame-Options: SAMEORIGIN
|
96
|
+
|
97
|
+
< X-XSS-Protection: 1; mode=block
|
98
|
+
|
99
|
+
< X-Content-Type-Options: nosniff
|
100
|
+
|
101
|
+
< ETag: W/"460d2cbdc5ecf1d7417e99fc879fd127"
|
102
|
+
|
103
|
+
< Cache-Control: max-age=0, private, must-revalidate
|
104
|
+
|
105
|
+
< X-Request-Id: 5c24d399-9c62-4ffe-b4fa-47caed6409e9
|
106
|
+
|
107
|
+
< X-Runtime: 0.013970
|
108
|
+
|
109
|
+
< Access-Control-Allow-Origin: *
|
110
|
+
|
111
|
+
< Access-Control-Allow-Methods: POST, GET, OPTIONS
|
112
|
+
|
113
|
+
< Access-Control-Allow-Headers: *
|
114
|
+
|
115
|
+
< Access-Control-Allow-Credentials: true
|
116
|
+
|
117
|
+
< X-Frame-Options: ALLOW
|
118
|
+
|
119
|
+
```
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
今回のケースでは結局、nginxの設定を削除し、rails側の設定でALLOWとする。
|