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

Server-base-path not applied to WSS connections #208998

Open
okalldal opened this issue Mar 28, 2024 · 2 comments
Open

Server-base-path not applied to WSS connections #208998

okalldal opened this issue Mar 28, 2024 · 2 comments
Assignees

Comments

@okalldal
Copy link

okalldal commented Mar 28, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: insiders build as of March 27
  • OS Version:

Steps to Reproduce:

  1. code-insiders serve-web --host 0.0.0.0 --port 8080 --server-base-path=/ides/foo
  2. open a local browser and enable developer tools
  3. access the server on http://localhost:8080/ides/foo
  4. Inspect network connections and check WSS connections
  5. These do not have the base server prefix

As a consequence, the following does not work:

Through nginx proxy, for example, when requesting https://foo.example.com/ides/foo, a wss error occurs. By checking the browser console, you can see the wss error, and the request address is wss://foo.example.com/oss-xxxx, which does not include the server base path URI path.

An example configuration for nginx proxy is as follows:

upstream vscode {
server 192.168.0.100:8888;
}
server {
servername foo.example.com;
location / {
proxy_pass http://vscode/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}

Related issue: #208278

@aeschli
Copy link
Contributor

aeschli commented Mar 28, 2024

code-insiders serve-web --server-base-path=/ides/foo

image

@aeschli
Copy link
Contributor

aeschli commented Mar 28, 2024

That said, I have a problem when running with 0.0.0.0:
code-insiders serve-web --host 0.0.0.0 --port 8080 --server-base-path=/ides/foo
image

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