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

why localhost not work & 127.0.0.1 work ?? #47

Open
IamViditAgarwal opened this issue Nov 9, 2018 · 5 comments
Open

why localhost not work & 127.0.0.1 work ?? #47

IamViditAgarwal opened this issue Nov 9, 2018 · 5 comments

Comments

@IamViditAgarwal
Copy link

IamViditAgarwal commented Nov 9, 2018

Hi , In your widget you have mentioned that for loading the widget user needs to enter the url like http://127.0.0.1:8866 , I wonder why localhost not works instead for 127.0.0.1 ? I tried entering url like http://localhost:8866 , It give me following error : serverconnection.js:172 GET http://localhost:8866/api/kernelspecs?1541748996695 403 (Forbidden)


If I want to host this application on my secure domain , would it be possible that this work ?

@astrojuanlu
Copy link

See also #37

astrojuanlu added a commit to astrojuanlu/ipywidgets_server that referenced this issue Nov 22, 2018
@astrojuanlu
Copy link

Try:

diff --git a/ipywidgets_server/app.py b/ipywidgets_server/app.py
index fb4b6e9..ae66b01 100644
--- a/ipywidgets_server/app.py
+++ b/ipywidgets_server/app.py
@@ -187,7 +187,8 @@ class WidgetsServer(Application):
         app = tornado.web.Application(
             handlers,
             kernel_manager=kernel_manager,
-            kernel_spec_manager=kernel_spec_manager
+            kernel_spec_manager=kernel_spec_manager,
+            allow_remote_access=True,
         )
         app.listen(self.port)
         self.log.info(f'Ipywidgets server listening on port {self.port}.')

@pbugnion
Copy link
Owner

This is great! @Juanlu001 A PR for this would be super useful! Initially just setting allow_remote_access to True would be enough. Later on, we could expose it as a configuration parameter.

@astrojuanlu
Copy link

Hi @pbugnion! I was not sure if the project was still maintained :) I am using it a lot for a freelance job so I'm pushing some updates to my fork, I will contribute them back when things have settled in a couple of weeks (I will try to take care of #36 as well)

@pbugnion
Copy link
Owner

I was not sure if the project was still maintained

That's a valid question. I've just opened issue #48 to discuss this.

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

No branches or pull requests

3 participants