Skip to content

List of known API paths #583

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

Closed
infogulch opened this issue Apr 24, 2019 · 3 comments
Closed

List of known API paths #583

infogulch opened this issue Apr 24, 2019 · 3 comments
Labels
enhancement Some improvement that isn't a feature

Comments

@infogulch
Copy link

infogulch commented Apr 24, 2019

I noted in a couple comments that if there was a reasonably well-known list of uri paths that the coder app uses when connecting to the backing server, one could configure their frontend proxy to route some of the unused paths to different ports in the container. This would allow the user to build and create a web app in the app, run it, and then view it directly in the browser at the same domain as the IDE.

For example, if you host your coder instance at ide.mydomain.com/ where requests are normally routed to the container's port 8443, you could configure your proxy to route requests to ide.mydomain.com/web/ to port 8080 in the container, which could be served by a web server running in the coder terminal.

The problem is I don't know what paths are available. (Or even if any paths are available at all -- all paths might be potentially meaningful to vscode internals, I don't even know that much.) A (semi-)official list of used or open paths would be really helpful.

Here are some of the paths I've noticed that coder definitely does use just by interacting with the app:

  • /, root obviously, converted into a websocket
  • Direct assets like /file.png, /git.svg, /service-worker.js, etc
  • I think I saw some requests to /Resources/*, but I can't seem to reproduce it.

Are there any available paths that coder will never use? If so, is the list above exhaustive, or are there additional paths that coder uses?

@infogulch infogulch added the enhancement Some improvement that isn't a feature label Apr 24, 2019
@code-asher
Copy link
Member

At the moment there is no guarantee that code-server won't use certain paths. The safest thing would be to always give the IDE its own sub-domain or sub-directory.

With that said, I believe this is an exhaustive list as it currently stands:

  • /
  • /<asset>
  • /resource/<path to resource>
  • /login
  • /login/<asset>
  • /tunnel
  • /ports
  • /ping
  • /lib/vscode/<path to asset>
  • /packages/ide/src/fill/webview.html

@infogulch
Copy link
Author

Perfect, thank you for this list!

@kylecarbs
Copy link
Member

Closing for now. Would be good to document the above at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

3 participants