-
Notifications
You must be signed in to change notification settings - Fork 6k
Reverse proxy Issue Related to Security Header (V2 Preview) #925
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
Comments
Same problem |
Hmm, I'm on 2.preview.11-vsc1.37.0 and dont have a problem with my reverse proxy (Nginx), also still using exactly the same config as the with last final release. |
I'm using apache2 for reversed proxy server. The same configuration works for codeserver V1 but not V2. RewriteEngine on RequestHeader set X-Forwarded-Proto https RewriteCond %{HTTP:Upgrade} =websocket [NC] #ProxyPass / http://192.168.19.11:9000/ |
I don't think its our fault, you misconfigured your proxy hence this error appears. I can't replicate this issue at all at nginx and Apache |
I'm using the Apache configuration documented at https://github.com/cdr/code-server/blob/master/doc/quickstart.md. It works perfectly fine on V1 but not V2 preview The ws request should return 101 but returned 200 http status code Same Apache reversed proxy config works fine on code-server code-server V1 |
@weikai You might need to do the debug yourself then PR a fixed config. |
I have the same problem and I suspect that the problem is not in the Apache proxy config. |
I suggest debugging it and see if its really code-server. I have never encountered this on GCP so I don't think it'd be an issue. |
@sr229 Can you share your Apache2 configuration that you tested was working? I'm trying to figure out the differences. I've been Googling and testing different Apache2 configurations for 3 weeks but none of them have worked. |
@weikai I used nginx so I was not able to reproduce it. I tried Apache breifly from the docs and it should work fine as well. I'll go raise this issue to the team to see if its really from our side. |
Thank you @sr229. I'm able to get Nginx working on the same testing server with no problem as well. However, my production server has to use Apache2 for various reasons. It will be great to get Codeserver V2 working with Apache2 reverse server. |
Uh oh!
There was an error while loading. Please reload this page.
code-server
version: 2.preview.7-vsc1.37.0Description
The reverse proxy on V2 Preview doesn't work. It looked like there're issues with ws forwarding.
Error during WebSocket handshake: Invalid status line
Error: HTTP/1.1 400 Bad Request
at ve.preHandleWebSocket (/src/build/code-server2.preview.8-vsc1.37.0-linux-x86_64-built/out/vs/server/src/cli.js:413:924)
at ve. (/src/build/code-server2.preview.8-vsc1.37.0-linux-x86_64-built/out/vs/server/src/cli.js:411:549)
at Generator.next ()
at /src/build/code-server2.preview.8-vsc1.37.0-linux-x86_64-built/out/vs/server/src/cli.js:16:979
at new Promise ()
at r (/src/build/code-server2.preview.8-vsc1.37.0-linux-x86_64-built/out/vs/server/src/cli.js:16:756)
at Server.onUpgrade (/src/build/code-server2.preview.8-vsc1.37.0-linux-x86_64-built/out/vs/server/src/cli.js:411:501)
at Server.emit (events.js:189:13)
at onParserExecuteCommon (_http_server.js:552:14)
at onParserExecute (_http_server.js:500:3)
The text was updated successfully, but these errors were encountered: