Access-Control-Allow-Origin
http 応答ヘッダーのセキュリティ ポリシーを次のようにテストしていますnginx
。
add_header Access-Control-Allow-Origin "https://google.com";
私のドメインではリクエストが失敗することが予想されますが、リクエストは機能しており、ステータス コード 200 が返されます。実際にAccess-Control-Allow-Origin
応答ヘッダーが設定されていることを確認します。
Access-Control-Allow-Origin:https://google.com
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html
Date:Tue, 05 Feb 2013 20:22:17 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Pragma:no-cache
Server:nginx
Strict-Transport-Security:max-age=31556926
Transfer-Encoding:chunked
X-Frame-Options:DENY
そして、リクエストヘッダーは正しいオリジンを示しています:
Origin:https://mydomainhere.com
何がこれを引き起こしているのでしょうか?リクエストは失敗すると思います。
ありがとう。