Title: [Bug]: 'Error: WebSocket close with status code 1006' behind nginx proxy · Issue #6023 · coder/code-server · GitHub
Open Graph Title: [Bug]: 'Error: WebSocket close with status code 1006' behind nginx proxy · Issue #6023 · coder/code-server
X Title: [Bug]: 'Error: WebSocket close with status code 1006' behind nginx proxy · Issue #6023 · coder/code-server
Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: edge Local OS: macos Remote OS: ubuntu Remote Architecture: x86 code-server --version: 4.6.0 Steps to Reproduce proxy with nginx: lo...
Open Graph Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: edge Local OS: macos Remote OS: ubuntu Remote Architecture: x86 code-server --version: 4.6.0...
X Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: edge Local OS: macos Remote OS: ubuntu Remote Architecture: x86 code-server --version: 4.6.0...
Opengraph URL: https://github.com/coder/code-server/issues/6023
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: 'Error: WebSocket close with status code 1006' behind nginx proxy","articleBody":"### Is there an existing issue for this?\r\n\r\n- [X] I have searched the existing issues\r\n\r\n### OS/Web Information\r\n\r\n- Web Browser: edge\r\n- Local OS: macos\r\n- Remote OS: ubuntu\r\n- Remote Architecture: x86\r\n- `code-server --version`: 4.6.0\r\n\r\n\r\n### Steps to Reproduce\r\n\r\n1. \r\nproxy with nginx:\r\n```\r\n location /code/ {\r\n proxy_pass https://0.0.0.0:9997/;\r\n proxy_http_version 1.1;\r\n proxy_set_header Host $host;\r\n proxy_set_header Upgrade $http_upgrade;\r\n proxy_read_timeout 86400;\r\n proxy_set_header Connection $connection_upgrade;\r\n proxy_set_header Accept-Encoding gzip;\r\n }\r\n```\r\nrun code-server\r\n\r\n```\r\ncode-server --cert MyCertificate.crt --cert-key MyKey.key --port 9997\r\n```\r\n\r\n2. visit from url: `${myhost}/code/`\r\n\r\n\r\n\r\n\r\n### Expected\r\n\r\nCode server opens up to home screen.\r\n\r\n### Actual\r\n\r\nerror log:\r\n\r\n\r\n\r\n\r\n### Logs\r\n\r\n\r\n\r\n\r\n\r\n### Screenshot/Video\r\n\r\n_No response_\r\n\r\n### Does this issue happen in VS Code or GitHub Codespaces?\r\n\r\n- [X] I cannot reproduce this in VS Code.\r\n- [X] I cannot reproduce this in GitHub Codespaces.\r\n\r\n### Are you accessing code-server over HTTPS?\r\n\r\n- [X] I am using HTTP.\r\n\r\n### Notes\r\n\r\nWhy does code-server create a websocket connection with port 80? And how can this issue be solved?\r\n\r\nThe network environment of the host machine:\r\nThe port 80 has been disabled by the administrator of the host machine, only a few ports are open.","author":{"url":"https://github.com/zirui","@type":"Person","name":"zirui"},"datePublished":"2023-02-16T08:51:38Z","url":"https://github.com/coder/code-server/issues/6023"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:668bf995-7296-cdc3-7212-5526ecec2c4d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AA06:1F2F:7748CB:A12D9A:6B04402E |
| html-safe-nonce | 215cfcbc85404fe706730acf35c9e18dd72f44d36f023fdc3c0072d1cc096fb2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTA2OjFGMkY6Nzc0OENCOkExMkQ5QTo2QjA0NDAyRSIsInZpc2l0b3JfaWQiOiIxNTIxMjg1Nzg4OTI5OTAwNTkwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4d89e8797ff477f1d4827ba025c2fe975a77d46f541ea8b77e8ab366e2bf659d |
| hovercard-subject-tag | issue:1587278700 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/code-server/6023/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0d6eb7b99d61bfe7e1039c5a05244063509fa7df221d40a51670ec393846bf21/coder/code-server/issues/6023 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0d6eb7b99d61bfe7e1039c5a05244063509fa7df221d40a51670ec393846bf21/coder/code-server/issues/6023 |
| og:image:alt | Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: edge Local OS: macos Remote OS: ubuntu Remote Architecture: x86 code-server --version: 4.6.0... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zirui |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/code-server git https://github.com/coder/code-server.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 172953845 |
| octolytics-dimension-repository_nwo | coder/code-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 172953845 |
| octolytics-dimension-repository_network_root_nwo | coder/code-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width