TransWikia.com

X-Frame-Options in Magento 2.3.5-p1

Magento Asked on December 30, 2021

I’ve set X-Frame-Options
'x-frame-options' => '*',
in env as mentioned in the doc
Magento Docs

But still I’m getting this error

Refused to display ‘https://mythridpartyurlhere.com/’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’.

One Answer

Just because you allow iframes to load from any URL it does not mean the third party resource allows you to.

If you read the error carefully it mentions the third party URL itself has sameorigin set and not your Magento installation.

Refused to display 'https://mythridpartyurlhere.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

There is nothing you can do about this, the third party does not allow you to load this resource in an iframe on your website.

To confirm this check the response headers on the resource:

enter image description here

Answered by Ben Crook on December 30, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP