docker - 此 set-cookie 被阻止,因为它的域包含 docker 和 nginx
问题描述
第一次使用 docker 和 nginx 反向代理。
设置
- Dockerized 前端与 Vuejs 后面 localhost:4200
- 在 localhost:80 上的 dockerized nginx 后面使用 Symfony 进行 Dockerized
麻烦
每次我向响应中添加 cookie 时,Set-Cookie 都会被前面忽略。
告诉我:
This Set-Cookie was blocked because its Domain attribute was invalid with regards to the current host url.
我试过的
- 将不同的域添加到 cookie 配置中。
- 在 nginx 中添加一个新标头。
正如我所说,我是这个设置的新手,无法确定问题是来自 nginx 还是 cookie 配置。
编辑:它实际上适用于邮递员。
解决方案
推荐阅读
- c# - MongoDB.Driver.MongoCommandException:命令 getMore 失败:BSONObj 大小:45888169 (0x2BC32A9) 无效。大小必须介于 0 和 16793600(16MB) 之间
- mysql - 在主查询和子查询中使用相同的别名
- sql - 从雪花中的字符串中删除变音符号
- wordpress - 根据 WordPress 中的帖子对象 (ACF) 标题自动生成标签
- makefile - sphinx-build force 在“下载文件不可读”时失败
- c# - 如何使用 Automapper 10 将映射配置文件注入另一个配置文件
- c# - 如何在不运行应用程序的情况下测试 Wep API 客户端
- php - 我如何通过按下按钮将某些东西插入到 php 中的数组中
- c++ - Qt C++。如何指定保存记录的路径?
- c# - FromSqlRaw 从 SELECT + CONTAINSTABLE 返回 0 个元素,带有两个参数