Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add computed or given ip address or hostname to tornado init #1006

Closed
wants to merge 1 commit into from

Conversation

athivillon
Copy link

Voila.ip is documented as "--Voila.ip=
The IP address the notebook server will listen on.
Default: 'localhost'
"

But this is false, Tornado is listening on all interfaces, including public ones, even if we use 127.0.0.1. In my opinion, this is a huge security risk, at least for using Voila on servers having Internet access.

This patch initialises Tornado with address option filled with ip computed or passed on command-line.

@github-actions
Copy link
Contributor

Binder 👈 Try it on binder (branch athivillon/voila/main)

@@ -566,7 +566,7 @@ def listen(self):
success = False
for port in self.random_ports(self.port, self.port_retries+1):
try:
self.app.listen(port)
self.app.listen(port,address=self.ip)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your contribution! A minor code format problem:

Suggested change
self.app.listen(port,address=self.ip)
self.app.listen(port, address=self.ip)

@trungleduc
Copy link
Member

Thank @athivillon for your contribution, I close this PR since #926 is merged with the same feature.

@trungleduc trungleduc closed this Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants