Page 1 of 1

--allow-file-access-from-files

PostPosted: Sun Jul 28, 2013 3:57 pm
by Desu
Hello,

I am trying to access file:// loaded iframes from a file:// loaded page with js. But then of course i am getting:
"Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match."

i tried adding --allow-file-access-from-files to CefArgs but it didnot change anything?
Am i doing this wrong or do i have to use a custom scheme either way?

Re: --allow-file-access-from-files

PostPosted: Mon Jul 29, 2013 11:52 am
by magreenblatt
You probably need to use a custom scheme.

Re: --allow-file-access-from-files

PostPosted: Fri Aug 02, 2013 11:00 am
by Desu
Yes, Thanks for the reply, i am using a custom scheme now.

Re: --allow-file-access-from-files

PostPosted: Tue Aug 13, 2013 7:30 am
by dshaulov
Adding the switch in OnBeforeCommandLineProcessing worked for us in normal cef, don't know about CefGlue.

Code: Select all
virtual void OnBeforeCommandLineProcessing( const CefString& process_type, CefRefPtr<CefCommandLine> command_line)
{
   command_line->AppendSwitch("allow-file-access-from-files");
}

Re: --allow-file-access-from-files

PostPosted: Tue Aug 13, 2013 7:43 am
by fddima
dshaulov wrote:Adding the switch in OnBeforeCommandLineProcessing worked for us in normal cef, don't know about CefGlue.

For CefGlue it is also will work. But in common case - better is using custom scheme.

Re: --allow-file-access-from-files

PostPosted: Tue Sep 13, 2016 4:06 pm
by goldeneyes
Hello,

Sorry if I'm writing in the wrong Forum, but anybody know how to convert the command above to Delphi, I want to add the parameter of allow-file-access-from-files

Regards