2
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?

More than 3 years have passed since last update.

originとは?

Posted at

勉強前イメージ

ドメインのことだと思ってたけど、違うみたい。。

調査

originとは

この場合はwebのoriginになります。

originとはURLのスキーム(プロトコル)、ホスト(ドメイン)、ポートによって定義されています。
スキーム(プロトコル)、ホスト(ドメイン)、ポート が同一であれば同じoriginということになります。

スキーム?ホスト?どの部分のこと?

例として、以下を使用します。

https://www.hogehoge.co.jp/home/blog
  • スキーム : https://
  • ホスト : www.hogehoge.co.jp
  • ポート : ↑のURLでは省略されているのですが、 https://www.hogehoge.co.jp:443 の443のこと

originの例

同一origin

異なるorigin

勉強後イメージ

originはドメインと同様ではなかったのか・・・・
一緒のものだと思ってたけど、http→httpsに変わってもoriginは異なるのか。

参考

2
0
1

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
2
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?