在默认的情况ASP.NET框架,会出现如下
[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文件修改头部名称
<system.web> <sessionState cookieName="SessID" /> </system.web>
这样就可以
[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
本文出自 “枫林晚” 博客,请务必保留此出处http://fengwan.blog.51cto.com/508652/1964058
ASP.NET修改ASP.NET_SessionId头部隐藏开发语言
原文地址:http://fengwan.blog.51cto.com/508652/1964058