I have a standalone C# WCF service running as a Windows service. I have the requirement to add custom headers like "X-Xss-Protection" to all responses. I have tried with the following script in app.config file but this doesn't add any HTTP header to the response.
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By"/>
<remove name="X-AspNet-Version"/>
<remove name="HTTPServer"/>
<remove name="Microsoft-IIS"/>
<add name="Strick-Transport-Security" value="max-age=31536000;includeSubDomains"/>
<add name="Content-Security-Policy" value="script-src 'unsafe-eval' https://www.google.com 'self' 'unsafe-inline'"/>
<add name="X-Xss-Protection" value="1; mode=block"/>
<add name="Feature-Policy" value="geolocation 'none'"/>
<add name="Cache-Control" value="no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0"/>
<add name="Pragma" value="no-cache"/>
<add name="Expires" value="0"/>
</customHeaders>
</httpProtocol>
</system.webServer>