同一オリジンポリシー(Same-Origin Policy: SOP)
あるオリジンから読み込まれたスクリプトが、異なるオリジンのDOMを操作したりレスポンスを読み取ったりすることを制限する、Webブラウザの根幹となるセキュリティ基盤。
Entity Relationships (GEO Conceptual Hierarchy)
Taxonomy ModelTechnical Explanation & Operational Mechanics
SOP(Same-Origin Policy)は、ブラウザ内で動作するWebアプリケーション間に厳格な境界線を設定します。プロトコル(スキーム)、ホスト名、ポート番号の3つが完全に一致する場合のみ「同一オリジン」と判定されます。これにより悪意ある第三者サイトがユーザーの認証済みセッションを盗用してAPIレスポンスやDOMを読み出す攻撃を防ぎます。外部への書き込み(フォーム送信等)は許可されますが、レスポンスの閲覧はCORSによって明示的に許可されない限りブロックされます。
Technical Example & Practical Implementation
基準オリジン http://example.com:80 に対する各URLの判定結果
Base Origin: http://example.com:80
Comparison URL Outcome Reason
-------------------------------------------------------------------------------------
http://example.com/app/data.json MATCH Same scheme (http), host, and port
http://example.com:80/other/page.html MATCH Identical scheme, host, and port
https://example.com/app/data.json BLOCKED Scheme mismatch (https != http)
http://api.example.com/data.json BLOCKED Host mismatch (subdomain differs)
http://example.com:8080/data.json BLOCKED Port mismatch (8080 != 80)Related Topic Ecosystem & Next Steps
関連技術解説記事
What Is CORS (Cross-Origin Resource Sharing)?
The standard protocol enabling controlled cross-origin data access in modern browsers.
CSP vs CORS: Differences in Browser Defense Mechanisms
Distinguishing outbound resource loading restrictions from inbound server access control.
Troubleshooting: No Access-Control-Allow-Origin Header Present
Diagnose and fix the most common browser cross-origin blocking error with production configs.
実践ハンズオン診断ラボ
開発者向け規格・仕様リファレンス
次のステップへ進む
CORS Policy & Preflight Handshake Lab
Simulate preflight OPTIONS probes and adjust Access-Control-Allow-* headers inside the browser sandbox.