Skip to content

CODER_ACCESS_URL shouldn't require protocol #2874

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

Closed
Tracked by #3182
ammario opened this issue Jul 9, 2022 · 4 comments · Fixed by #3317
Closed
Tracked by #3182

CODER_ACCESS_URL shouldn't require protocol #2874

ammario opened this issue Jul 9, 2022 · 4 comments · Fixed by #3317
Assignees

Comments

@ammario
Copy link
Member

ammario commented Jul 9, 2022

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.

@ammario ammario added the bug label Jul 9, 2022
@sandros94
Copy link

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.

@sreya sreya self-assigned this Jul 29, 2022
@tjcran tjcran mentioned this issue Jul 29, 2022
25 tasks
@spikecurtis
Copy link
Contributor

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.

@ammario
Copy link
Member Author

ammario commented Jul 29, 2022

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.

@ketang
Copy link
Contributor

ketang commented Jul 31, 2022

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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants