Getting around X-Frame-Options in a Chrome extension is pretty easy. But unfortunately this is not working for a Chrome Web Store URL. When I try to load https://chrome.google.com/webstore/category/apps in an iframe, I still get this console error:

Refused to display 'https://chrome.google.com/webstore/category/apps' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

And this is what gets loaded inside the iframe tag: <html><head></head><body></body></html>

I'm sure I removed the X-Frame-Options header correctly in onHeadersReceived(), as this works for example with http://www.google.com (and it doesn't without removing the X-Frame-Options header).

Any idea on how to fix this?

有帮助吗?

解决方案

The Chrome Web Store has special permissions that block extensions from manipulating it. See this answer for more details.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top