Skip to content

Support proxying ports without separate sub-domains #6195

Closed
@502647092

Description

@502647092

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: EDGE
  • Local OS: Windows
  • Remote OS: Linux
  • Remote Architecture: x64
  • code-server --version: 4.12.0

Steps to Reproduce

config env
PROXY_DOMAIN: domain.ltd
VSCODE_PROXY_URI: https://{{port}}-code.domain.ltd

open https://{{port}}-code.domain.ltd redirect to coder-server

Expected

redirect to loca proxy port

Actual

redirect to coder-server

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

#5311

const parts = domain.split(".")
// There must be an exact match.
const port = parts.shift()
const proxyDomain = parts.join(".")
if (!port || !req.args["proxy-domain"].includes(proxyDomain)) {
return undefined
}

maybe can use regex to match port
example
VSCODE_PROXY_URI {{port}}-code.domain.ltd
5140-code.domain.ltd match port to 5140

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSome improvement that isn't a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions