所以,这是场景:
1)正常情况
Request:
Client Browser ->(HTTP Request) -> MyServer.com
Response:
MyServer.com -> (HTTP Response with Cookie on MyServer.com) -> clientBrowser
2)代理情况
Request:
Client Browser ->(HTTP Request) -> ProxyServer.com -> (Http Request) -> MyServer.com
Response:
MyServer.com -> (HTTP Response with Cookie on MyServer.com) -> ProxyServer.com -> (Http Response with ???) -> clientBrowser
问题是:
a)ProxyServer会在Http响应中看到我的cookie,对吧? (在http响应头中)。
b)ProxyServer.com能否在Myserver.com域中设置cookie(来自Myserver.com)?
答案 0 :(得分:0)
您可以在创建Cookie时自己明确设置Cookie的域名。
这是如何在php中完成的
bool setcookie ( string $name [, string $value [, int $expire = 0 [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false ]]]]]] )
谷歌的其他脚本语言..
这就是你要找的东西吗?