-
Notifications
You must be signed in to change notification settings - Fork 208
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
Allow specifying subdirectory to open when port forwarding detected #413
Comments
Hi 👋 This sounds cool, thanks for putting this up 💡 Quick clarifying question, as |
How do they apply to all ports when you're required to specify a port specification (single integer or string range) e.g., "portAttributes": {
"4000": {
"path": "/azure-sdk"
}
} I certainly wouldn't want this to apply to all ports specified in the |
Thanks for clarifying, your request makes sense to me. |
/cc @alexr00 for the VS Code side. |
|
Je sais pas comment faire |
This seems reasonable to me! |
@alexr00 what would be the next steps? Is this something you'd like help with, if I can? I looked in the VSCode repo originally and didn't find any code that seemed to process |
@samruddhikhandale @alexr00 Is this something Codespaces can adopt too? I remember the implementation there to be more involved than when the VS Code UI runs in a local window. |
Looping in @osortega who can help answer this question. |
The next steps:
I would expect that there should be any additional work from Codespaces to make this happen. This would just be a property in the @heaths when would you expect the subdirectory to be applied?
|
Just those two. The link in the terminal window - at least as output from I'd be happy to submit PRs to respective repos, but it seems all those - including the one you linked to that I found previously - are just parsing/processing the config. Is the code that actually uses it and does all the forwarding / browser work elsewhere? Is that internal/private and would need to be done by you or someone on your team? |
I don't think we actually need to make any changes to how the port is forwarded. If a process is listening at The thing that we need to do is make sure to append the path (eg.
I would suggest adding a Updating the parsing somewhere here: The merging of attributes here: Then ensuring the here: and here: |
We would like a way to configure a path (subdirectory) of a site to open from a devcontainer. In VSCode, for example, clicking the
browse
button - or from the automatic prompt to open a browser when a port is forwarded - we could open a site likehttp://127.0.0.1:4000/azure-sdk
instead of onlyhttp://127.0.0.1:4000
. For GitHub Codespaces, this would be forwarded port to a remote continer.To
portAttributes
orotherPortAttributes
, this would add:path
http://127.0.0.1:4000/blog
on localhost.To the schema for both
portAttributes
orotherPortAttributes
1, this would look like:See microsoft/vscode-remote-release#9518 for additional context.
1 Since
portAttributes
andotherPortAttributes
appear to be the same schema, wouldn't a$ref
to a single object definition be sufficient and easier to maintain?The text was updated successfully, but these errors were encountered: