From 310fd066e91f454b990372ffa30e803cc8120975 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:56:40 +0100 Subject: unslug zh-cn: move --- files/zh-cn/glossary/origin/index.html | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 files/zh-cn/glossary/origin/index.html (limited to 'files/zh-cn/glossary/origin') diff --git a/files/zh-cn/glossary/origin/index.html b/files/zh-cn/glossary/origin/index.html new file mode 100644 index 0000000000..83090ee98f --- /dev/null +++ b/files/zh-cn/glossary/origin/index.html @@ -0,0 +1,52 @@ +--- +title: Origin +slug: Glossary/源 +translation_of: Glossary/Origin +--- +

Web内容的源由用于访问它的{{Glossary("URL")}} 的方案(协议),主机(域名)和端口定义。只有当方案,主机和端口都匹配时,两个对象具有相同的起源。

+ +

某些操作仅限于同源内容,而可以使用 CORS 解除这个限制。

+ +

同源的例子

+ + + + + + + + + + + + +
http://example.com/app1/index.html
+ http://example.com/app2/index.html
same origin because same scheme (http) and host (example.com)
http://Example.com:80
+ http://example.com
same origin because a server delivers HTTP content through port 80 by default
+ +

不同源的例子

+ + + + + + + + + + + + + + + + +
http://example.com/app1
+ https://example.com/app2
different schemes
http://example.com
+ http://www.example.com
+ http://myapp.example.com
different hosts
http://example.com
+ http://example.com:8080
different ports
+ +

了解更多

+ +

详细信息,请看同源策略

-- cgit v1.2.3-54-g00ecf