pro*_*mar 5 .net c# asp.net session-cookies
我有一个在SSL上运行的应用程序,我已经在System.Web下的web.config中添加了以下内容.
<httpCookies requireSSL="true" httpOnlyCookies="true" lockItem="true" />
Run Code Online (Sandbox Code Playgroud)
但我仍然得到一个名为"cookieSesssion1"的无担保cookie.它没有被标记为安全.
你能告诉我我能把它标记为安全吗?
编辑: 除了Web.config指令,我在Global.asax文件中也有以下代码.
protected void Application_EndRequest(object sender, EventArgs e)
{
if (Response.Cookies.Count > 0)
{
foreach (string s in Response.Cookies.AllKeys)
{
Response.Cookies[s].Secure = true;
}
}
}
Run Code Online (Sandbox Code Playgroud)
我错过了什么,请帮忙
FortiWeb Web 应用程序防火墙 (WAF) 会话 cookie 名为cookiesession1
\n\n对于来自客户端的第一个 HTTP/HTTPS 请求,FortiWeb 会在 HTTP 标头的 response\xe2\x80\x99s Set-Cookie: 字段中嵌入 cookie。它被命名为cookiesession1。(FortiWeb 不单独使用源 IP 地址和时间戳进行会话:NAT 可以隐藏多个客户端;时钟可以更改。)
\n\nhttp://help.fortinet.com/fweb/537/Content/FortiWeb/fortiweb-admin/http_sessions_security.htm
\n\nhttp://help.fortinet.com/fweb/536/Content/FortiWeb/fortiweb-admin/global_object_white_list.htm
\n| 归档时间: |
|
| 查看次数: |
1639 次 |
| 最近记录: |