Show More
@@ -456,6 +456,11 class NotebookApp(BaseIPythonApplication): | |||||
456 | config=True, |
|
456 | config=True, | |
457 | help='The notebook manager class to use.') |
|
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 | def parse_command_line(self, argv=None): |
|
464 | def parse_command_line(self, argv=None): | |
460 | super(NotebookApp, self).parse_command_line(argv) |
|
465 | super(NotebookApp, self).parse_command_line(argv) | |
461 | if argv is None: |
|
466 | if argv is None: | |
@@ -508,7 +513,8 class NotebookApp(BaseIPythonApplication): | |||||
508 | else: |
|
513 | else: | |
509 | ssl_options = None |
|
514 | ssl_options = None | |
510 | self.web_app.password = self.password |
|
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 | if not self.ip: |
|
518 | if not self.ip: | |
513 | warning = "WARNING: The notebook server is listening on all IP addresses" |
|
519 | warning = "WARNING: The notebook server is listening on all IP addresses" | |
514 | if ssl_options is None: |
|
520 | if ssl_options is None: |
General Comments 0
You need to be logged in to leave comments.
Login now