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

NGinx Proxy Manager no longer compatible with addon-vscode v5.5.3 or above #407

Closed
thor0215 opened this issue Mar 13, 2023 · 1 comment
Closed

Comments

@thor0215
Copy link

Problem/Motivation

addon-vscode v5.5.3 includes code-server v4.10.1. code-server v4.10.1 added a new security check for websockets. The default proxy setup using the NGinx Proxy Manager is not compatible with this check and causes the addon-vscode to not fully load

Expected behavior

Proxy server should properly send the x-forwarded-host header to the backend server by default the same way it does for x-forwarded-for.

Actual behavior

x-forwarded-host header is missing from proxy_set_header setup

Steps to reproduce

Setup both vscode and nginx-proxy-manager addons and follow default NGinx proxy configuration. Then go to secured port and try to load vscode in HA

Proposed changes

I was able to fix this issue by adding this configuration to the advanced configuration of my proxy setup as a workaround:
location / {
# Needed to workaround VSCode Web Socket Origin error
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;

# Proxy!
include conf.d/include/proxy.conf;
}

Here is the link to v4.10.1 code-server
https://github.com/coder/code-server/releases/tag/v4.10.1

Link to code-server's new origin security check:
https://github.com/coder/code-server/blob/be40eca5d92ac2edbd3196e50df1493272431ded/src/node/http.ts#L341-L371

@frenck
Copy link
Member

frenck commented Mar 13, 2023

Cool.

I don't see how that is an issue for/of the nginx proxy manager.

../Frenck

@frenck frenck closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants