Skip to content

fix: allow ports in wildcard url configuration - #11657

Merged
Emyrk merged 5 commits into
mainfrom
stevenmasley/wildcard_url_with_port
Jan 18, 2024
Merged

Emyrk merged 5 commits into
mainfrom
stevenmasley/wildcard_url_with_port

Conversation

@Emyrk

@Emyrk Emyrk commented Jan 17, 2024 •

Copy link
Copy Markdown
Member

This just forwards the port to the ui that generates urls.
Our existing parsing + regex already supported ports for
subdomain app requests.

Closes #8189

Tested with subdomain apps and port forwarding.

Remanent of the past

We have this old assumption that apphost and accessurl are on the same port.

https://github.com/coder/coder/blob/2b4ea6d9bad4201077bd3bf1a1c7e2f1b56efab0/coderd/workspaceapps.go#L35-L38

This might now not be the case. For backwards compatibility, we have to keep this here, but it could be a problem if the access url has a port, and the wildcard domain does not.

Workspace proxies?

Workspace proxies do not have this "port inheritance" thing going on. I think the port inheritance is a mistake, but for backwards compatibility, it has to be kept on the primary.

Emyrk commented Jan 17, 2024 •

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Emyrk and the rest of your teammates on Graphite Graphite

@deansheather deansheather left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs tests for actual serving too, and the frontend should be checked to ensure it functions with this

@Emyrk

Emyrk commented Jan 17, 2024

Copy link
Copy Markdown
Member Author

@deansheather I checked the frontend. I'll add some tests.

@Emyrk Emyrk added the release/breaking This label is applied to PRs to detect breaking changes as part of the release process label Jan 17, 2024
@Emyrk Emyrk changed the title fix: allow ports in wildcard url configuration fix!: allow ports in wildcard url configuration Jan 17, 2024
@Emyrk Emyrk changed the title fix!: allow ports in wildcard url configuration fix: allow ports in wildcard url configuration Jan 17, 2024
@Emyrk Emyrk removed the release/breaking This label is applied to PRs to detect breaking changes as part of the release process label Jan 17, 2024
Base automatically changed from stevenmasley/ports_in_wildcard to main January 17, 2024 16:41
Emyrk added 3 commits January 17, 2024 10:44
This just forwards the port to the ui that generates urls.
Our existing parsing + regex already supported ports for
subdomain app requests.
@Emyrk
Emyrk force-pushed the stevenmasley/wildcard_url_with_port branch from a673da8 to ed4410c Compare January 17, 2024 16:44
@Emyrk
Emyrk marked this pull request as ready for review January 17, 2024 17:11
@Emyrk
Emyrk requested a review from deansheather January 17, 2024 18:04
@Emyrk
Emyrk merged commit 6bb1a34 into main Jan 18, 2024
@Emyrk
Emyrk deleted the stevenmasley/wildcard_url_with_port branch January 18, 2024 15:44
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port is missing when port-forwarding via Dashboard

2 participants