I have an iframe embedded in an ASP.NET web form. I have included what I thought was the correct Content-Security-Policy values in the web.config.
However, I still get a CSP violation in the web browser as follows:
Refused to frame 'https://www.{xyz}.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://*.{abc}.com https://{abc}.com".
I have my web.config configured as follows:
<add name="Content-Security-Policy"
value="frame-src 'self' https://*.{xyz}.com https://*.{abc}.com; frame-ancestors https://*.{abc}.com https://*.{xyz}.com;" />
I have tried all possible configurations which is why I just decided to put the two sites in both the frame-src and frame-ancestors keys.
I've spent some time on this, but to no avail. Any suggestions would be great. Thanks.