在默认的情况ASP.NET框架,会出现如下
[[email protected] ~]# curl -I http://127.0.0.1 HTTP/1.1 200 OK Server: VWS/1.0 Date: Sun, 10 Sep 2017 00:58:56 GMT Content-Length: 0 Connection: keep-alive Cache-Control: private Set-Cookie: ASP.NET_SessionId=djoozwy53q55gjol5cizjsoo; path=/; HttpOnly
这样一下就知道是采用.NET开发,现在我们就通过修改web.config文件修改头部名称
<system.web> <sessionState cookieName="SessID" /> </system.web>
这样就可以
[[email protected] ~]# curl -I http://127.0.0.1 HTTP/1.1 200 OK Server: VWS/1.0 Date: Sun, 10 Sep 2017 01:19:55 GMT Content-Length: 0 Connection: keep-alive Cache-Control: private Set-Cookie: SessID=eznygdvlh1ewwuk4wfdg5ogk; path=/; HttpOnly
时间: 2024-11-08 17:52:06