title: Can't remove x-powered-by header in Node Express
body: <p>I've gone through every question and blog I can find on the topic, but I can't get rid of x-powered-by: express.</p>
  <p>Here's my app which has the sole function of not displaying the &quot;x-powered-by: express&quot; header, combining every bit of advice I've been able to find on how to do this. I've tried each one individually, but none have an effect:</p>
  <pre><code>&quot;use strict&quot;;    
  var express = require(&quot;express&quot;);
  var app = express();
  app.set(&quot;x-powered-by&quot;, &quot;your mum&quot;);
  
  const helmet = require(&quot;helmet&quot;);
  app.use(helmet());
  
  const killHeader = (req, res, next) =&gt; {
     res.removeHeader(&quot;X-Powered-By&quot;);
     next();
  };
  
  app.get(&quot;/&quot;, killHeader, (req, res) =&gt; {
     res.header(&quot;X-powered-by&quot;, &quot;A sack of rats&quot;);
     res.removeHeader(&quot;X-Powered-By&quot;);
     res.send(&quot;Hello world without x-powered headers&quot;);
  });
  
  app.disable(&quot;x-powered-by&quot;);
  
     app.listen(3000, function () {
        console.log(&quot;Running&quot;);
     });
  </code></pre>
  <p>I feel like I must be missing a key bit of information as to where headers get generated and sent from, as no combination of the above strategies makes a differences when inspected in the network tab of Chrome. The environment is windows, run via VSCode, but I have the same problem on Ngix in Ubuntu.</p>