在默认的情况ASP.NET框架,会出现如下
1 2 3 4 5 6 7 8 |
[root@hkdb1 ~]# 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文件修改头部名称
1 2 3 |
<system.web> <sessionState cookieName="SessID" /> </system.web> |
这样就可以
1 2 3 4 5 6 7 8 |
[root@hkdb1 ~]# 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 |