Same-origin policy on file scheme

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.

Same-origin policy on file scheme

Postby chellio » Mon Jul 25, 2016 10:46 am

I set browser settings as below:

Code: Select all
    CefBrowserSettings sett;
    sett.universal_access_from_file_urls = STATE_ENABLED;
    sett.file_access_from_file_urls = STATE_ENABLED;


However, X-Frame-Options header is still enforced.
Trying to display such page on iframe, that is in local file, give me following error:

Code: Select all
"Refused to display 'https://www.google.pl/?' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.", source: about:blank (0)
.

I think with universal_access_from_file_urls option, X-Frame-Options header should not be enforced.
chellio
Techie
 
Posts: 27
Joined: Fri May 20, 2016 9:26 am
Location: Poland

Re: Same-origin policy on file scheme

Postby fddima » Mon Jul 25, 2016 10:54 am

Does it works in chrome with same command line flags?
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Same-origin policy on file scheme

Postby chellio » Mon Jul 25, 2016 11:31 am

I tested it in cefclient and also failed.
chellio
Techie
 
Posts: 27
Joined: Fri May 20, 2016 9:26 am
Location: Poland

Re: Same-origin policy on file scheme

Postby fddima » Mon Jul 25, 2016 11:47 am

chellio wrote:I tested it in cefclient and also failed.

What about standard chrome?
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Same-origin policy on file scheme

Postby chellio » Mon Jul 25, 2016 11:55 am

There is no allow-universal-access-from-files option according to http://peter.sh/experiments/chromium-co ... -switches/, but also failed.(in chrome browser)
But for example --disable-image-loading is enforced in cefclient, but in chrome brorwser no.
Last edited by chellio on Mon Jul 25, 2016 12:10 pm, edited 1 time in total.
chellio
Techie
 
Posts: 27
Joined: Fri May 20, 2016 9:26 am
Location: Poland


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 90 guests