Show More
@@ -168,12 +168,15 b' class AuthenticatedHandler(RequestHandler):' | |||||
168 | @property |
|
168 | @property | |
169 | def ws_url(self): |
|
169 | def ws_url(self): | |
170 | """websocket url matching the current request |
|
170 | """websocket url matching the current request | |
171 |
|
171 | |||
172 | turns http[s]://host[:port] into |
|
172 | turns http[s]://host[:port] into | |
173 | ws[s]://host[:port] |
|
173 | ws[s]://host[:port] | |
174 | """ |
|
174 | """ | |
175 | proto = self.request.protocol.replace('http', 'ws') |
|
175 | proto = self.request.protocol.replace('http', 'ws') | |
176 | return "%s://%s" % (proto, self.request.host) |
|
176 | host = self.application.ipython_app.websocket_host # default to config value | |
|
177 | if host == '': | |||
|
178 | host = self.request.host # get from request | |||
|
179 | return "%s://%s" % (proto, host) | |||
177 |
|
180 | |||
178 |
|
181 | |||
179 | class AuthenticatedFileHandler(AuthenticatedHandler, web.StaticFileHandler): |
|
182 | class AuthenticatedFileHandler(AuthenticatedHandler, web.StaticFileHandler): |
@@ -295,11 +295,14 b' class NotebookApp(BaseIPythonApplication):' | |||||
295 | """set mathjax url to empty if mathjax is disabled""" |
|
295 | """set mathjax url to empty if mathjax is disabled""" | |
296 | if not new: |
|
296 | if not new: | |
297 | self.mathjax_url = u'' |
|
297 | self.mathjax_url = u'' | |
298 |
|
298 | |||
299 | base_project_url = Unicode('/', config=True, |
|
299 | base_project_url = Unicode('/', config=True, | |
300 | help='''The base URL for the notebook server''') |
|
300 | help='''The base URL for the notebook server''') | |
301 | base_kernel_url = Unicode('/', config=True, |
|
301 | base_kernel_url = Unicode('/', config=True, | |
302 | help='''The base URL for the kernel server''') |
|
302 | help='''The base URL for the kernel server''') | |
|
303 | websocket_host = Unicode("", config=True, | |||
|
304 | help="""The hostname for the websocket server.""" | |||
|
305 | ) | |||
303 |
|
306 | |||
304 | mathjax_url = Unicode("", config=True, |
|
307 | mathjax_url = Unicode("", config=True, | |
305 | help="""The url for MathJax.js.""" |
|
308 | help="""The url for MathJax.js.""" |
General Comments 0
You need to be logged in to leave comments.
Login now