Skip to content

fix: allow ports in wildcard url configuration #11657

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

Merged
merged 5 commits into from
Jan 18, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jan 17, 2024

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.

host := api.AppHostname
if host != "" && api.AccessURL.Port() != "" {
host += fmt.Sprintf(":%s", api.AccessURL.Port())
}

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.

Copy link
Member Author

Emyrk commented Jan 17, 2024

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

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

Copy link
Member

@deansheather deansheather left a comment

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
Copy link
Member Author

Emyrk commented Jan 17, 2024

@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