This commit is contained in:
fanxb 2019-06-24 13:47:30 +08:00
parent e769157b6e
commit 46d59134b1
3 changed files with 7 additions and 7 deletions

View File

@ -1,14 +1,12 @@
---
id: '2019-03-05-13-41'
date: '2019/03/05 13:41'
title: 'web跨域及cookie学习'
tags: ['web', 'http请求跨域', 'cookie共享', 'get', 'post']
id: "2019-03-05-13-41"
date: "2019/03/05 13:41"
title: "web跨域及cookie学习"
tags: ["web", "http请求跨域", "cookie共享", "get", "post"]
categories:
- 'web'
- "web"
---
**本篇原创发布于:**[FleyX 的个人博客](http://tapme.top/blog/detail/2019-03-05-13-41)
  之前对于跨域相关的知识一致都很零碎,正好现在的代码中用到了跨域相关的,现在来对这些知识做一个汇总整理,方便自己查看,说不定也可能对你有所帮助。
**本篇主要内容如下:**
@ -110,3 +108,5 @@ server {
- Domain : `.example`,path : `/a`可获取 cookie:http://example:8081/a , https://localhost:8081/a , http://test.example:889/a
**注意**:在跨域请求中,即时目标地址有 cookie 且发起请求的页面也能读取到该 cookie浏览器也不会将 cookie 自动设置到该跨域请求中。比如在http://localhost:8082/a页面中请求http://localhost:8081/abc,这两个地址下拥有共享cookiehttp请求也不会携带cookie。
**本篇原创发布于:**[FleyX 的个人博客](http://tapme.top/blog/detail/2019-03-05-13-41)

BIN
wx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB