TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Why do web servers still reveal their type and version in headers?

3 pointsby johnsandersover 2 years ago
Isn't that inviting bad actors to scour the web for servers with just the right vulnerability? What's to gain by revealing that?

2 comments

LinuxBenderover 2 years ago
There is no need to reveal this today. Long ago most daemons would advertise what they were and their version in the event clients might need to negotiate around specific behaviors, quirks or bugs.<p>In NGinx one can get rid of this without recompiling by adding the &quot;nginx-mod-http-headers-more&quot; module and adding to nginx.conf:<p><pre><code> more_set_headers &#x27;Server: IIS&#x2F;4.0&#x27;; # or whatever </code></pre> HAProxy and most load balancer daemons can filter out or replace the Server header. Apache requires a recompile to drop the Server header unless one puts HAProxy in front of it due to the order in how headers are processed. In HAProxy:<p><pre><code> http-response set-header Server Silly </code></pre> or<p><pre><code> http-response del-header Server </code></pre> After making changes one can scan their headers in SecurityHeaders [1] to see what has changed, or use curl:<p><pre><code> curl --head https:&#x2F;&#x2F;some.tld&#x2F; </code></pre> As to why they still display this? Showing off in crawler stats who is dominate on the internet.<p>[1] - <a href="https:&#x2F;&#x2F;securityheaders.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;securityheaders.com&#x2F;</a>
评论 #33294810 未加载
评论 #33303407 未加载
sylwareover 2 years ago
Some sites may provide a default noscript&#x2F;basic (x)html web interface.