I have nginx setup to front a python paste instance. They are on the same box with paste serving from 127.0.0.1 and nginx serving to outside world.

The problem comes when my python app sets cookies, the domain stays with localhost rendering the cookies useless. Obviously I'm not the first to encounter this, but I'm having trouble finding the standard solution to this?

有帮助吗?

解决方案

The proxy_cookie_domain directive is exists exactly for this case.

But it most likely that you do not pass the Host header.

proxy_set_header Host $host;

http://nginx.org/r/proxy_set_header

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top