These are chat archives for ipython/ipython

1st
Dec 2014
Dave Hirschfeld
@dhirschfeld
Dec 01 2014 18:51
Capture.PNG

I'm attempting to get the notebook server running with the latest master. Previously I was embedding the notebook in an iframe defined as:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Notebook Server</title>
    </head>
    <iframe src="http://localhost:5678" 
            style="position: absolute; width: 98%; height: 99%" 
            sandbox="allow-forms allow-same-origin allow-scripts allow-top-navigation"
            seamless>
    </iframe>
</html>

I've defined the following (to no avail) in my config:
c.NotebookApp.ip = '*'
c.NotebookApp.port = 5678
c.NotebookApp.allow_origin = '*'
c.NotebookApp.webapp_settings = {'headers': {'X-Frame-Options': 'SAMEORIGIN'}}
...but the the iframe content is blank. When I load with firebug I get the response

Reload the page to get source for: http://localhost:5678/tree

(see pic above)

Thomas Kluyver
@takluyver
Dec 01 2014 18:53
@rgbkrk might be able to help with that, if he's around
Dave Hirschfeld
@dhirschfeld
Dec 01 2014 18:53
Am I doing something wrong / missing something obvious?
Kyle Kelley
@rgbkrk
Dec 01 2014 18:53
Same origin restrictions apply to ports IIRC
is the iframe HTML on a separate port?
I'm not seeing the actual error log here
Dave Hirschfeld
@dhirschfeld
Dec 01 2014 18:55
I'm initially just trying to load the above index.html in the browser so I guess that means port 80?
Sorry, my web skills are nearly non-existent :(
Kyle Kelley
@rgbkrk
Dec 01 2014 18:55
That's ok
im going to have to run in a minute, but I'll be back in an hour
Dave Hirschfeld
@dhirschfeld
Dec 01 2014 18:57
Ok, no worries thanks for taking a look anyway.
Capture.PNG
Kyle Kelley
@rgbkrk
Dec 01 2014 18:58
Try setting the x-frame-options header to blank for now
Dave Hirschfeld
@dhirschfeld
Dec 01 2014 18:58
...I can't see any errors per-se, The iframe is simply blank and firebug reveals the response to be Reload the page as shown above
Kyle Kelley
@rgbkrk
Dec 01 2014 18:59
in the future we should be using content security policies, which makes the configuration easier
i have a pr that addresses the shortcomings of x frame options (no longer fully supported in all browsers), we'll be discussing it tomorrow
assumig that's the issue here and it's not related to JavaScript caching
ok, gotta run I'll be back later today!
I'd switch to the console tab to see what errors there are
Dave Hirschfeld
@dhirschfeld
Dec 01 2014 19:02
That did the job! :D
Which is to say the below worked for me:
c.NotebookApp.webapp_settings = {'headers': {'X-Frame-Options': ''}}
Thanks for your help!
Thomas Kluyver
@takluyver
Dec 01 2014 19:18
@minrk we were discussing last week that setting a traitlet value shouldn't make it calculate the default. I have just implemented that in #7041, as I ran into it again.
Jason Grout
@jasongrout
Dec 01 2014 22:45
@jdfreder?
Jonathan Frederic
@jdfreder
Dec 01 2014 23:44
@jasongrout
Kyle Kelley
@rgbkrk
Dec 01 2014 23:56
@jdfreder
:)
Jonathan Frederic
@jdfreder
Dec 01 2014 23:56
@rgbkrk
jdfreder @jdfreder is an echo service