Welcome Guest Search | Active Topics | Sign In | Register

Bypass CORS issue in EO.WebBrowser Options
Khoa
Posted: Friday, May 15, 2020 8:36:13 AM
Rank: Advanced Member
Groups: Member

Joined: 9/3/2014
Posts: 68
Hi,

I am looking for the solution to fix CORS issue to load resources in multiple domains in EO.WebBrowser. The 2019 version does not have CORS restriction while 2020 version has restriction for crossing origin requests.

Thank you.
eo_support
Posted: Friday, May 15, 2020 9:29:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

You can try to set this property to false and see if it helps:

https://www.essentialobjects.com/doc/eo.webengine.browseroptions.enablewebsecurity.aspx

See here for more details on how to set this option:

https://www.essentialobjects.com/doc/webbrowser/advanced/browser_options.aspx

Thanks!
Khoa
Posted: Monday, May 25, 2020 7:17:21 PM
Rank: Advanced Member
Groups: Member

Joined: 9/3/2014
Posts: 68
That fixes the CORS issue with EnableWebSecurity=false. However, I have another issue with Content Security Policy directive: "frame-ancestors 'self', which prevents to load a website inside an iframe. How to bypass this restriction also.

Thank you.
eo_support
Posted: Tuesday, May 26, 2020 11:39:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

We don't have built-in support for you to bypass everything. EnableWebSecurity is the only option exposed. However you can search online to see if there are any Chrome command line switch that you can use to achieve what you wanted. If such command line switch exists for Chrome browser, you can try to pass the switch to EO.WebBrowser through this property:

https://www.essentialobjects.com/doc/eo.webengine.engineoptions.extracommandlineargs.aspx

Note that we do not support all Google Chrome switches. So it is possible that some switches works for Chrome but not for EO.WebBrowser.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.