Angular+Tornado+nginx跨站域Cookie访问设置

版权声明:本文为博主原创文章,转载文章须附上文章来源与作者。 https://blog.csdn.net/ChangerJJLee/article/details/84575619

Tornado

  • self.set_header(“Access-Control-Allow-Credentials”, “true”)
  • self.set_header(‘Access-Control-Allow-Methods’, ‘POST, GET, OPTIONS’)
  • self.set_header(“Access-Control-Allow-Origin”, “*”)

Angular

  • 请求头添加 withCredentials = true

nginx

  • 配置文件中需有此项 proxy_hide_header Set-Cookie;

猜你喜欢

转载自blog.csdn.net/ChangerJJLee/article/details/84575619