【问题标题】:Loosing cookie when swich from http to https从 http 切换到 https 时丢失 cookie
【发布时间】:2012-12-28 06:11:30
【问题描述】:

我可以在我的网站中选择更改语言。

当用户更改语言时,它会保存在cookie中,以便其他页面知道要显示哪种语言!

有些页面在 https 中。在这些页面中,我没有得到所选的语言。

有没有办法为httphttps 使用相同的cookie?

【问题讨论】:

标签: c# http cookies https


【解决方案1】:

不,没有。 cookie 是域本地的,http 和 https 页面被认为在不同的域中。

https 页面是加密的,因此为 http 请求发送相同的 cookie 会泄露该信息,并破坏加密。

【讨论】:

【解决方案2】:
猜你喜欢
  • 2014-06-08
  • 2015-03-22
  • 2011-12-11
  • 1970-01-01
  • 2010-10-01
  • 1970-01-01
  • 2014-11-10
  • 1970-01-01
相关资源
最近更新 更多