{"id":197,"date":"2021-04-09T10:23:30","date_gmt":"2021-04-09T10:23:30","guid":{"rendered":"http:\/\/blog.bp8.pl\/?p=197"},"modified":"2021-04-09T11:25:40","modified_gmt":"2021-04-09T11:25:40","slug":"azure-app-service-how-to-remove-the-custom-headers-x-frame-options-x-xss-protection-x-content-type-options","status":"publish","type":"post","link":"https:\/\/blog.bp8.pl\/index.php\/2021\/04\/09\/azure-app-service-how-to-remove-the-custom-headers-x-frame-options-x-xss-protection-x-content-type-options\/","title":{"rendered":"Azure App Service how to remove the custom headers X-Frame-Options; X-XSS-Protection; X-Content-Type-Options ?"},"content":{"rendered":"\n<p>The custom headers can be removed by modifying the customHeaders section of the web.config as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?>\n&lt;configuration>\n  &lt;system.web>\n  &lt;\/system.web>\n  &lt;system.webServer>\n    &lt;httpProtocol>\n      &lt;customHeaders>\n        &lt;remove name=\"X-Powered-By\"\/>\n        &lt;clear\/>\n\n        &lt;!-- here we remove custom headers -->\n        &lt;add name=\"X-Frame-Options\" value=\"SAMEORIGIN\"\/>\n        &lt;add name=\"X-Xss-Protection\" value=\"1; mode=block\"\/>\n        &lt;add name=\"X-Content-Type-Options\" value=\"nosniff\"\/>\n        &lt;!-- here we remove custom headers -->\n\n        &lt;add name=\"Referrer-Policy\" value=\"strict-origin-when-cross-origin\"\/>\n        &lt;add name=\"Permissions-Policy\" value=\"accelerometer=(self), camera=(self), geolocation=(self), gyroscope=(self), magnetometer=(self), microphone=(self), payment=(self), usb=(self)\"\/>\n      &lt;\/customHeaders>\n    &lt;\/httpProtocol>\n  &lt;\/system.webServer>]\n&lt;\/configuration>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The custom headers can be removed by modifying the customHeaders section of the web.config as follows:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[95,94],"tags":[84,83,90,87,93,91,92],"_links":{"self":[{"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/posts\/197"}],"collection":[{"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":3,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":207,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/posts\/197\/revisions\/207"}],"wp:attachment":[{"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bp8.pl\/index.php\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}