RAJENDRA PRASAD S.J
RAJENDRA PRASAD S.J

Reputation: 83

How to remove specific HTTP Response Header?

I want to remove X-Powered-By and Allow methods from response. How to remove or add filter to remove these parameters from response from server?

Upvotes: 0

Views: 2237

Answers (2)

nitija
nitija

Reputation: 1

You should add below lines in project Web.Config File. That should help.

<httpProtocol>
  <customHeaders>
    <remove name="X-Powered-By" />
    <add name="X-Frame-Options" value="DENY" />
  </customHeaders>
</httpProtocol>

Upvotes: 0

Idan Adar
Idan Adar

Reputation: 44516

You can do this in your server or in your load balance or proxy or any such HTTP Server. See for example: https://developer.ibm.com/answers/questions/243439/how-can-we-remove-the-x-powered-by-response-header.html

Upvotes: 1

Related Questions