Skip to content

port proxy via domain conflicts with code server #1804

Closed

Description

@geiseri

if i use the subdomain proxy approach with my external name i get an error. my server is at `code.foo.local and domain to foo.local. i get the error below:
image
must the domain be a child as 1234.code.foo.local?

Activity

  1. nhooyr commented on Jun 13, 2020

    @nhooyr
    Contributor

    Should just work. cc @code-asher

  2. code-asher commented on Jun 13, 2020

    @code-asher
    Member

    Oof, something unfortunate seems to have happened to the CSS, we'll have to look into that.

    Yeah if you have --proxy-domain foo.local then it will try to proxy *.foo.local which includes code.foo.local.

    That means you'll need to use --proxy-domain code.foo.local and browse to <port>.code.foo.local like you've noted, or use some other domain for the proxying if that feels too long.

    The proxy feature uses the host header, so you could also set the host to foo.local when the domain is code.foo.local, then code-server won't proxy because it'll think it's on foo.local.

    We should add a check to make sure the subdomain is a number before proxying to better support a same-level scenario like this.

  3. code-asher commented on Jun 13, 2020

    @code-asher
    Member

    Oh right the CSS won't load because all the CSS requests will be having the same "not a valid number" error. So nevermind on that.

  4. locked and limited conversation to collaborators on Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions