nginx允许跨域获取cookie的方法
# 使用场景 在 A 域名的页面向 B 域名提交数据时需要代入 B 域名的 cookie,否则 B 域名会跳转到登陆页面。解决方式需要使用到 nginx 反向代理,配置如下: 12345678910111213server { listen port ssl http2; server_name xxx.com; ssl_certificate_key /xxx.key; ssl_certificate /xxx.pem; proxy_cookie_path ~(.*) "$1; SameSite=None; secure;...
more...