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

using a server worker as a forward proxy #513

Open
GitHub4LP opened this issue Dec 5, 2024 · 4 comments
Open

using a server worker as a forward proxy #513

GitHub4LP opened this issue Dec 5, 2024 · 4 comments

Comments

@GitHub4LP
Copy link

Proposed change

Some service responses are based on the root path, but the actual address that can be accessed is based on the subpath /jupyter_subpath/proxy/{{port}}/, can there be a solution to solve this kind of problem, e.g., using a server worker as a forward proxy?

Alternative options

Optional

Who would use this feature?

Some service responses are based on the root path, but the actual address that can be accessed is based on the subpath /jupyter_subpath/proxy/{{port}}/

(Optional): Suggest a solution

server worker as a forward proxy

@manics
Copy link
Member

manics commented Dec 5, 2024

Jupyter-server-proxy already has absolute_url and mappath options, is there anything that can't be handled by these?

@GitHub4LP
Copy link
Author

GitHub4LP commented Dec 7, 2024

Jupyter-server-proxy already has absolute_url and mappath options, is there anything that can't be handled by these?

Some web services respond based on /, i.e., the browser automatically requests host/x , but through the jupyter-server-proxy, the real address can be accessed is host/jupyter_subpath/proxy/{{port}}/x , through the server worker can intercept the host/x, and instead request the host/jupyter_subpath/proxy/{{port}}/x response
@manics

@manics
Copy link
Member

manics commented Dec 21, 2024

Unfortunately that's not possible. Jupyter Server only has control of paths under http://host/jupyter_subpath/. If you want control of paths outside of jupyter-server (i.e. http://host/x you'll probably need to use a front-end proxy (e.g. nginx, traefik, etc) with a custom route

@GitHub4LP
Copy link
Author

GitHub4LP commented Dec 23, 2024

I mean, a server worker can do that.
@manics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants