We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
跨域一般用于同源策略,不同的协议、主机以及端口都算作跨域:
http://example.com
https://example.com
https://www.example.com
http://example.com:80
http://example.com:8080
跨站一般用于 cookie 配置,不区分协议和端口:
比如 www.example.com 和 example.com 就是同站。
www.example.com
example.com
这并不是说不区分二级域名,例如很多带有国家顶级域名的 .com.cn,所以使用二级域名区分是行不通的。
.com.cn
严格意义上说,需要保证主机名后缀定义在 公共后缀列表 中。
例如,github.io 就被定义在这个列表中。
github.io
所以,first.github.io 和 second.github.io 不能算作同站。
first.github.io
second.github.io
另外 chrome 会发送 Sec-Fetch-Site 请求头来标识当前请求的来源:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
跨域一般用于同源策略,不同的协议、主机以及端口都算作跨域:
http://example.com
和https://example.com
https://www.example.com
和https://example.com
http://example.com:80
和http://example.com:8080
跨站一般用于 cookie 配置,不区分协议和端口:
比如
www.example.com
和example.com
就是同站。这并不是说不区分二级域名,例如很多带有国家顶级域名的
.com.cn
,所以使用二级域名区分是行不通的。严格意义上说,需要保证主机名后缀定义在 公共后缀列表 中。
例如,
github.io
就被定义在这个列表中。所以,
first.github.io
和second.github.io
不能算作同站。另外 chrome 会发送 Sec-Fetch-Site 请求头来标识当前请求的来源:
The text was updated successfully, but these errors were encountered: