Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

How to disable cross origin security

Post Reply
tad.chen
Posts: 104
Joined: Fri Jan 04, 2019 1:39 am

How to disable cross origin security

Post by tad.chen »

I want to disable cross origin security in some TChromium instances of browser, but enable cross origin security in other TChromium instances.

Is it possible?

I set chrmosr.Options.WebSecurity to STATE_DISABLED in those TChromium instances which I want to disable cross origin security. But it doesn't work!

I use an old CEF4Delphi version, maybe a new version can work. If that, which version supports it?
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to disable cross origin security

Post by salvadordf »

The WebSecurity browser preference was removed by CEF in this commit :
https://bitbucket.org/chromiumembedded/cef/commits/35a360fe66d1e85584866f23daf452fcd36c090b

That commit fixed this issue :
https://bitbucket.org/chromiumembedded/cef/issues/3058/remove-cefbrowsersettingsweb_security

Apparently Chromium changed internally and that setting was not very useful any longer so the CEF project maintainer removed it. Read the comments in the last link for more information.

I'm not aware of any way to disable cors on an individual browser. At this moment you can set GlobalCEFApp.DisableWebSecurity to true to disable it in all the browsers.
tad.chen
Posts: 104
Joined: Fri Jan 04, 2019 1:39 am

Re: How to disable cross origin security

Post by tad.chen »

I see. Thank you for your information.
Post Reply