How do I removed X-Powered-By Express from Angula App hosted on Azure App Service

844 Views Asked by At

I have an angular app deployed to azure app service. it returns two X-Powered-By as part of its response headers as below

X-Powered-By: ASP.NET
X-Powered-By: Express

I want both removed. I modified the web config of the angular app by adding the following and redeployed to app service

<customHeaders>
        <remove name="X-Powered-By" />
     </customHeaders>

However, this only removed the first one(X-Powered-By: ASP.NET). I am still stuck with X-Powered-By: Express.

How do I remove X-Powered-By: Express.

I have seen posts like here how to remove X-Powered-By in ExpressJS

which wants you to add app.disable('x-powered-by'); to an app.js file.

I am still new to angular. I cant find any app.js file in my angular app and don't understand how to implement anything advised in that link

0

There are 0 best solutions below