Search code examples
x-frame-optionscustom-headers

Using X-Frame-Options customHeaders - add multiple uri/domains to the web.config?


Using X-Frame-Options customHeaders - add multiple uri/domains to the web.config?

. Is the following format to append multiple X-Frame-Options allowed in the web.config? And does it work?


Solution

  • Not possible with X-frame-Options, instead you should use

    <add name="Content-Security-Policy" value="frame-ancestors 'self' yourdomain1.com yourdomain2.com;"/>