Web Security 03 — X Powered By / Server

Brian Shen
2 min readApr 23, 2020

--

1. Intro

Many of us may not notice this http header until we use a security tool to scan our websites. Those tools often suggest us to remove this kind of header, for 2 reasons:

  • Make http header slighter
  • Avoid potential vulnerability.

So let’s have a look at this header in our prepare session blog system.

npm start

This header suggests that our backend is supported by Express.

Other samples:

Those headers can leak the backend server information. As we know, for Apache, IIS, there are some special security bugs. If a hacker knows which server a website is using and potential bugs of this kind of server, attacks may be taken.

2. How to fix

How can we remove this kind of http header then? Different backends have different configurations. Here we only cover our demo blog system: Express. In Express, we can disable it.

Now start again:

npm run-script startSafe

There will be no server information any more.

What is this place? Nanjing International Youth Culture Park, Nanjing, Jiangsu, China

--

--