Skip to content

Conversation

@jacobtomlinson
Copy link
Contributor

@jacobtomlinson jacobtomlinson commented Aug 15, 2018

I've come across situations where it would be useful to proxy to a port on a host other than localhost.

This PR adds an optional hostname option to the proxy url so users can specify things like:

/user/jacobtomlinson/lab/proxy/example.com/8080/somepath.html

The original format is still valid:

/user/jacobtomlinson/lab/proxy/8080/somepath.html

Copy link
Contributor

@yuvipanda yuvipanda left a comment

Choose a reason for hiding this comment

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

This is awesome!

However, I'd like us to implement a domain whitelist here. I'm mostly worried about things bypassing CORS through this.

@jacobtomlinson
Copy link
Contributor Author

@yuvipanda that sounds sensible! How do you recommend implementing this?

Two options I can think of are:

  • Additional Jupyter config options specific in extra config
  • An environment variable

@yuvipanda
Copy link
Contributor

I'd suggest using traitlets backed by environment variables. github.com/jupyterhub/nbgitpuller is an example of how to do this.

@rcthomas
Copy link
Contributor

rcthomas commented Oct 2, 2018

I confirm the awesome. I just tested this out with Dask and it was success, with a tiny tweak. In our case we want to get to an IP, not a domain name. I swapped out the domain name for a really bad IP regex (I can make it better) and it worked. Could we make it handle IPs instead of just domain names too?

@manics
Copy link
Member

manics commented Jul 1, 2022

Closed by #154

@manics manics closed this Jul 1, 2022
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.

4 participants