0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WEB APIとセキュリティを基本からまとめたみた【基礎】

Last updated at Posted at 2025-09-16

HTTPSの重要性

オリジンとAPIリクエスト

https :// sub.my-homepage.com  :  443  /foo
スキーム  + ホスト              +    ポート  = オリジン

同一オリジンポリシー

  • 他のオリジン絵のリクエストは遅れるが、レスポンスデータを受け取れない
  • scriptタグやimgタグによるレスポンスは受け取れる

CORSとは?

  • サーバ側が許可するオリジンの一覧を保持し、そのオリジンからのリクエストへのレスポンスは同一オリジンポリシーの対象外にできる =
    オリジン間のリソース共有(CORS)

参考サイト

ゼロから学ぶ WebAPI 開発:設計・実装・運用の基本

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?