##// END OF EJS Templates
Added trust_xheaders config option to delegate it to HTTPServer....
Alberto Valverde -
Show More
@@ -456,6 +456,11 class NotebookApp(BaseIPythonApplication):
456 456 config=True,
457 457 help='The notebook manager class to use.')
458 458
459 trust_xheaders = Bool(False, config=True,
460 help=("Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-For headers"
461 "sent by the upstream reverse proxy. Neccesary if the proxy handles SSL")
462 )
463
459 464 def parse_command_line(self, argv=None):
460 465 super(NotebookApp, self).parse_command_line(argv)
461 466 if argv is None:
@@ -508,7 +513,8 class NotebookApp(BaseIPythonApplication):
508 513 else:
509 514 ssl_options = None
510 515 self.web_app.password = self.password
511 self.http_server = httpserver.HTTPServer(self.web_app, ssl_options=ssl_options)
516 self.http_server = httpserver.HTTPServer(self.web_app, ssl_options=ssl_options,
517 xheaders=self.trust_xheaders)
512 518 if not self.ip:
513 519 warning = "WARNING: The notebook server is listening on all IP addresses"
514 520 if ssl_options is None:
General Comments 0
You need to be logged in to leave comments. Login now