##// END OF EJS Templates
Merge pull request #3147 from meteogrid/rproxy_support...
Min RK -
r10192:b0334932 merge
parent child Browse files
Show More
@@ -460,6 +460,11 class NotebookApp(BaseIPythonApplication):
460 config=True,
460 config=True,
461 help='The notebook manager class to use.')
461 help='The notebook manager class to use.')
462
462
463 trust_xheaders = Bool(False, config=True,
464 help=("Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-For headers"
465 "sent by the upstream reverse proxy. Neccesary if the proxy handles SSL")
466 )
467
463 def parse_command_line(self, argv=None):
468 def parse_command_line(self, argv=None):
464 super(NotebookApp, self).parse_command_line(argv)
469 super(NotebookApp, self).parse_command_line(argv)
465 if argv is None:
470 if argv is None:
@@ -512,7 +517,8 class NotebookApp(BaseIPythonApplication):
512 else:
517 else:
513 ssl_options = None
518 ssl_options = None
514 self.web_app.password = self.password
519 self.web_app.password = self.password
515 self.http_server = httpserver.HTTPServer(self.web_app, ssl_options=ssl_options)
520 self.http_server = httpserver.HTTPServer(self.web_app, ssl_options=ssl_options,
521 xheaders=self.trust_xheaders)
516 if not self.ip:
522 if not self.ip:
517 warning = "WARNING: The notebook server is listening on all IP addresses"
523 warning = "WARNING: The notebook server is listening on all IP addresses"
518 if ssl_options is None:
524 if ssl_options is None:
General Comments 0
You need to be logged in to leave comments. Login now