0

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

apk
  • 11
  • 2
  • This question appears to be addressed here --> https://stackoverflow.com/questions/10717685/how-to-remove-x-powered-by-in-expressjs Please check it out. – Ali Celebi Jun 01 '22 at 15:38
  • Does this answer your question? [how to remove X-Powered-By in ExpressJS](https://stackoverflow.com/questions/10717685/how-to-remove-x-powered-by-in-expressjs) – R. Richards Jun 01 '22 at 15:42
  • No please..those links do not seem to address my issue. they said to add app.disable('x-powered-by'); to the app.js file. my app deployed to the azure app service is an angular app and I am not sure where app.js file is in an angular app. I am still new to angular so I dont understand what they have described – apk Jun 01 '22 at 21:56

0 Answers0