title: How to remove X-Powered-By header from proxy-conf.js file in angular cli project
body: <p>I am trying to remove <code>x-powered-by</code> header from response headers in angular cli project.As there is no direct access for express, so how can we remove header from all request's response header.
  I tried following - </p>
  
  <pre><code>const PROXY_CONFIG = [
   {
     context: [
       '/'
     ],
     secure: false,
     bypass: function (req, res) {
       res.removeHeader('x-powered-by');
     }
   }
  ];
  
  module.exports = PROXY_CONFIG;
  </code></pre>
  
  <p>But it worked only for first request, for all other request it didn't work.</p>
  
  <p>I tried following as well but the function doesn't get triggered -</p>
  
  <pre><code> const PROXY_CONFIG = [
   {
     context: [
       '/'
     ],
     secure: false,
     onProxyRes: function (proxyRes, req, res) {
       delete proxyRes.headers['x-powered-by']; 
     }
   }
  ];
  
  module.exports = PROXY_CONFIG;
  </code></pre>
  
  <p>I referred following links - </p>
  
  <p><a href="https://stackoverflow.com/questions/59266224/angular-add-custom-http-response-headers-to-dev-ng-serve">Angular: add custom HTTP response headers to dev `ng serve`</a></p>
  
  <p><a href="https://stackoverflow.com/questions/43591539/how-set-proxy-headers-in-proxy-config-json-file-for-angularcli-project">How set proxy headers in proxy.config.json file for angularcli project</a></p>