Search code examples
angulariframex-frame-options

How to fix Refused to display in a frame because it set 'X-Frame-Options' to 'deny'


I'm getting error while using i-frame in angular

Refused to display 'https://localhost:2800/sample/id' in a frame because it set 'X-Frame-Options' to 'deny'.

Can anybody tell me how to solve this error

Thanks


Solution

  • I found Solution as i have access to server site. i disable X-frame-options in dev profile and it worked.

    Alternative Solution : you can also change X-frame-option in response headers to sameOrigin or allow-from uri(obsolete You can See Documentation).

    I hope It helps Someone. Thank You