cors - fetch request, set-cookie and cookie are ignored ,after I set credentials: "include" -
- i use fetch post cross origin request, response successful set-cookie header:
access-control-allow-credentials:true access-control-allow-headers:content-type access-control-allow-methods:* access-control-allow-origin:* access-control-max-age:100 set-cookie:csessionid=594747de551d49dcb278bb6a9ad71ccb; domain=jdcf88.com; expires=tue, 12-sep-2017 08:40:30 gmt; path=/
- then fetch data request, find request doesn't have cookie request header.the code is:
fetch('https://xxx.jdcf88.com/login/islogin?userid=4', { method: "get", credentials: "include", mode: "cors", body: body })
i pretty sure cookie set domain jdcf88.com. 3. don't know why fetch request don't have cookie header , server has set access-control-allow-credentials true, credentials include.
Comments
Post a Comment