Skip to content

workspace proxies: unique health check error if being treated as a subdomain app #11116

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
bpmct opened this issue Dec 10, 2023 · 6 comments · Fixed by #11586
Closed

workspace proxies: unique health check error if being treated as a subdomain app #11116

bpmct opened this issue Dec 10, 2023 · 6 comments · Fixed by #11586
Assignees

Comments

@bpmct
Copy link
Member

bpmct commented Dec 10, 2023

Background

A customer may mistakenly put a proxy in the same DNS path as wildcard apps, where the wildcard app somehow takes priority.

e.g. *.demo.coder.com vs proxy.demo.coder.com

image
image
image

Proposal

Show a unique error in the health check to explain the conflict and resolution

@cdr-bot cdr-bot bot added the bug label Dec 10, 2023
@bpmct
Copy link
Member Author

bpmct commented Dec 10, 2023

@deansheather mind taking this one?

@Emyrk
Copy link
Member

Emyrk commented Jan 11, 2024

This seems highly niche.

We also output the appropriate values when you do coder wsproxy create

CODER_PROXY_SESSION_TOKEN=<token> coder wsproxy server --primary-access-url https://<host>.com --http-address=0.0.0.0:3001 

I am having trouble even setting this up. When you create a new proxy, it requests the /buildinfo endpoint, which doesn't return a json payload, so you get:

$ go run main.go wsproxy server --primary-access-url=https://filebrowser--dev--coder--emyrk--apps.dev.coder.com/ ...
#...
Encountered an error running "coder workspace-proxy server"
create workspace proxy: failed to fetch build info from "https://filebrowser--dev--coder--emyrk--apps.dev.coder.com/": invalid character '<' looking for beginning of value

So you can't even start the workspace proxy here to set it up in the first place.

@bpmct
Copy link
Member Author

bpmct commented Jan 11, 2024

Hey - I'm down to close this as not planned if this is a very unlikely setup. I don't know how to reproduce it.

@Emyrk
Copy link
Member

Emyrk commented Jan 11, 2024

@bpmct I have already spent some time on this path, and I found some little things I can improve. I'll put up a PR or two, but I don't think I have the setup for this specific situation.

@Emyrk
Copy link
Member

Emyrk commented Jan 11, 2024

Cli error improvements: #11584

@Emyrk
Copy link
Member

Emyrk commented Jan 11, 2024

Found the way to reproduce, had it backwards. Fixed

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.

2 participants