Start a new topic

CrushFTP 7 - help to embed the Web Login page in an iframe

mendocinotim @ Sun Jan 18 12:28:48 EET 2015
While using CrushFTP 6, I had no trouble embedding the web interface front-end login to users through an [b]iframe[/b].
Now that I have upgraded to CrushFTP 7, the iframe has stopped working.

Can anyone help? Why is this not working now, and what must I do to fix this?

spinkb @ Sun Jan 18 13:03:11 EET 2015
Edit your prefs.xml file.

Set "Access-Control-Allow-Origin" to be "http://yourdomain.com"

Does that resolve it?

Technically being able to embed your site in a frame is considered a security issue, so by default its not allowed.

Thanks,
Ben
marcdebl @ Wed Jan 28 07:32:09 EET 2015
Adding the http://domain.com does not solve it for me
spinkb @ Wed Jan 28 09:12:14 EET 2015
Edit the prefs.xml file, set the "X-Frame-Options" to be blank.

Try that and let us know.

Thanks,
Ben
marcdebl @ Wed Jan 28 09:18:21 EET 2015
that solved the problem

thanks
scotts_hlps @ Thu Feb 05 08:46:24 EET 2015
I am having the same issue. We recently updated out security certificate, and now no longer are we able to display Crush in a frame.

I have checked and changed where needed the perfs.xml file as stated earlier in the messages.

Scott
spinkb @ Thu Feb 05 09:34:47 EET 2015
What error is chrome indicating about your frame in its console?
scotts_hlps @ Thu Feb 05 09:39:53 EET 2015
Looking in the javascript console I see that it states:

Refused to display 'http://files.domain.com/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Sandbox access violation: Blocked a frame at "http://www.domain.com" from accessing a frame at "null". The frame being accessed is sandboxed and lacks the "allow-same-origin" flag.
spinkb @ Thu Feb 05 10:36:47 EET 2015
OK, then that means you didn't change the value like we were indicating in prior posts for the other user...

You need to change that value in the prefs.xml file.

Thanks,
Ben
scotts_hlps @ Thu Feb 05 11:06:11 EET 2015
Thanks Ben.

I found that I had two copies of CrushFTP on two different volumes on my computer, and I was editing the wrong prefs.xml.

This time all I changed was to set the "X-Frame-Options" to be blank, and that fixed it.

Thanks again.
Login to post a comment