浏览器cookie存储不会显示已在响应标头中成功设置的任何cookie,如下所示,请注意,我正在从凭据为true的角度客户端发出CORS请求
Access-Control-Allow-Origin: http://localhost:4200
Connection: keep-alive
Content-Length: 1107
Content-Type: application/json; charset=utf-8
Date: Wed, 05 Dec 2018 17:33:36 GMT
ETag: W/"453-YuC5Z+aLoSvxqXVqyC/v5eLapic"
Set-Cookie: ajwt=s%3AaccessToken.q92LpjQnBMC5lERmKxawAmH13fLDP%2B%2Fda7CeHntWons; Max-Age=900; Path=/; Expires=Wed, 05 Dec 2018 17:48:36 GMT; HttpOnly
Set-Cookie: rjwt=s%3AeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1YmU0M2EwYWRmMjgwNTNlMmE1YTc5NmEiLCJpYXQiOjE1NDQwMzEyMTYsImV4cCI6MTU0NDYzNjAxNn0.R_epLw6tNXxtKYpy5pIn-_FScfXjW_uX73wNkc0v9Bo.wm6T2cKJz6qibH66bwpsIfTKurOqejw9E0mVpfRb2jY; Max-Age=86400; Path=/; Expires=Thu, 06 Dec 2018 17:33:36 GMT; HttpOnly
Vary: Origin
X-Powered-By: Express
cookie设置选项
httpOnly: true,
signed: true,
secure: false,
maxAge: ...
cors选项
origin: 'http://localhost:4200',
credentials: true
ng withCredentials
设置为true