Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • BJ Patel 77 posts 183 karma points
    4 days ago
    BJ Patel

    Preview Not working showing X-Frame-Options to deny.

    Getting issues while loading preview from the server. as show

    frame because it set 'X-Frame-Options' to 'deny'.

    As I have tried most of the recommended options to resolve it. like: setting from IIS and so on.

          <add name="X-Frame-Options" value="SAMEORIGIN" />

    enter image description here enter image description here

    And when I try to preview on the web server it works! (show preview) on the server with https://domain name.

    And it's showing a WebSocket connection error too. so not sure we have to follow any particular configuration for it?

    Thanks BJ

  • Damian 35 posts 253 karma points
    2 days ago

    Hi BJ.

    There's a second, location-specific customHeader definition for the /umbraco Backoffice. I don't recall if this is Umbraco stock web.config but the following is a somewhat relevant snippit from a training course, I'd recommend to confirm this config section as well:

    <location path="umbraco"> <system.webServer> <urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" /> <httpProtocol> <customHeaders> <remove name="Content-Security-Policy" /> <add name="Content-Security-Policy" value="default-src 'self' *; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: * * ; font-src 'self' data:;" /> </customHeaders> </httpProtocol> </system.webServer> </location>

    Hope this helps! Update with some more details if not, I've definitely resolved this one before and am glad to share. :v:

  • BJ Patel 77 posts 183 karma points
    1 day ago
    BJ Patel

    Hi Damian,

    Thank you. for sharing the code.

    But It did not resolve the issue, As still getting the same error message.

Please Sign in or register to post replies

Write your reply to: