Closed donotcodeit closed 4 years ago
The demos can display external websites inside of iframe.
https://github.com/chromelyapps/demo-projects/search?q=alldemoframe
The default external request handler has a filter for X-Frame-Options. That is more about an external request, but may help. See this search filter - https://github.com/chromelyapps/Chromely/search?q=X-Frame-Options
This helps, thank you!
I've registered the ExternalRequestSchemeHandlerFactory
in container
container.RegisterSingleton(typeof(IChromelySchemeHandlerFactory), "external-resources", typeof(ExternalRequestSchemeHandlerFactory));
and also added UrlScheme
new UrlScheme("external-resources", "http", string.Empty, string.Empty, UrlSchemeType.Custom, false),
new UrlScheme("external-resources", "https", string.Empty, string.Empty, UrlSchemeType.Custom, false),
I need to display any external website inside of
<iframe />
.To avoid cross-origin problem I can use
disable-web-security
command line argument.Some sites have set
X-Frame-Options
header tosameorigin
, and will be blocked by CEF. As an option to fix this, it is possible to use reverse proxy and filter out abovementioned header. It is working solution, that was taken from: https://stackoverflow.com/questions/55641868/is-there-a-way-to-avoid-x-frame-options-in-a-cef-windows-chromium-desktop-appBut I'm looking into Chromely implementation and trying to find some handler, that may allow to do same thing, but without external proxy. As I understand
CefLoadHandler
will be called for<iframe />
, but it seems it will not allow to modify response at this point.I've also checked several other handlers, but looks like they aren't used to handle
<iframe />
content. Any suggestions on how to achieve expected behavior?