Skip to content

CODER_ACCESS_URL shouldn't require protocol #2874

Closed

Description

@ammario

As a user, if the access URL is set to localhost:6080 instead of http://localhost:6080, workspaces will fail to build since "localhost" is assumed to be the protocol. We should either show an error that a protocol is required or add a protocol if none exists.

Activity

  1. sandros94 commented on Jul 28, 2022

    @sandros94

    This made me waste at least 4 hours.

    On a custom docker-compose (couple hours ago reading this issue) I made a correction in my env
    CODER_ACCESS_URL = "https://example.domain.com"
    so that

          CODER_ADDRESS: "0.0.0.0:7080"
          CODER_ACCESS_URL: "${CODER_DOMAIN}"
    

    would have worked...

    but forgetting I used the same env on the reverse proxy so it was trying to resolve https://https://example.domain.com

    A fix as simple as:

          CODER_ADDRESS: "0.0.0.0:7080"
          CODER_ACCESS_URL: "https://${CODER_DOMAIN}"
    

    was what I needed in the end.

  2. self-assigned this
    on Jul 29, 2022
  3. spikecurtis commented on Jul 29, 2022

    @spikecurtis
    Collaborator

    If we end up inferring a scheme, that scheme better be https. If anyone (highly inadvisably) wants to do http, they should be explicit about it.

  4. ammario commented on Jul 29, 2022

    @ammario
    MemberAuthor

    If we end up inferring a scheme, that scheme better be https. If anyone (highly inadvisably) wants to do http, they should be explicit about it.

    Yes, but I do think we should infer http for localhost or 127.0.0.1.

  5. ketang commented on Jul 31, 2022

    @ketang
    Contributor

    An alternative is that we require a protocol and do validation on this instead of letting it fail silently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions