Scope of CefAddCrossOriginWhitelistEntry() call

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Scope of CefAddCrossOriginWhitelistEntry() call

Postby Plinker1961 » Wed Jun 22, 2016 7:15 am

I am using a directory provider that maps content from a shared CDN (e.g., https://my.cdn.com) to the local file system. Testing this feature quickly revealed that content from the directory provider was being blocked due to CORS violations. Not wanting to disable web security (which is a workaround), I sought a cleaner solution. What I found that works is adding a cross-origin whitelist entry using something along the lines of:
Code: Select all
CefAddCrossOriginWhitelistEntry("https://my.application.com", "https", "my.cdn.com", true);

So here are my questions: what is the scope of this CefAddCrossOriginWhitelistEntry call? Global? I presume the answer here is Yes. Will this call impact all browsers currently instantiated as well as those that may be created later while the application is running? Again my assumption is Yes given that CefAddCrossOriginWhitelistEntry has no browser parameter or context.

To clarify, my CEF application uses multiple browser windows/tabs that get created and destroyed regularly, so I just want to double-check my assumptions regarding CefAddCrossOriginWhitelistEntry. Currently I call this only once per source origin (i.e., we have more than one source origin that wants access to the CDN). Hope that makes sense.

Thanks!
Plinker1961
Mentor
 
Posts: 65
Joined: Thu Feb 26, 2015 5:14 pm

Re: Scope of CefAddCrossOriginWhitelistEntry() call

Postby magreenblatt » Wed Jun 22, 2016 10:21 am

Yes, it is set globally.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Scope of CefAddCrossOriginWhitelistEntry() call

Postby Plinker1961 » Wed Jun 22, 2016 10:37 am

Thanks!
Plinker1961
Mentor
 
Posts: 65
Joined: Thu Feb 26, 2015 5:14 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 113 guests