Skip to content
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

Add support for path based routing #93

Closed
wants to merge 1 commit into from

Conversation

mkuklis
Copy link

@mkuklis mkuklis commented Jan 14, 2025

Hey @kevinmcconnell this PR is an attempt to add support for path based routing based on: #48

I'm not sure if this is a good take (I'm also new to go) but maybe this is a good start.

@y-nk
Copy link

y-nk commented Jan 19, 2025

i really like this PR, i hope it merges 🙏

@gedw99
Copy link

gedw99 commented Feb 4, 2025

This will help me to not have to use caddy .

thanks 🙏

@y-nk
Copy link

y-nk commented Feb 12, 2025

@kevinmcconnell 🙏

@kevinmcconnell
Copy link
Collaborator

@mkuklis thanks for contributing this, and sorry it took a while to properly respond to. This is a nice simple approach. However it does require the prefix to be a single path segment, which might be restrictive, so I'd like to try a way that allows for prefixes of any length. That means reworking some of the routing logic to support that sort of lookup, so it turns into a somewhat bigger change.

So I've taken a slightly different approach to this in #113. It's similar in purpose to what you have here, but allows arbitrarily-long path segments, and provides the option to also strip that prefix before forwarding the request upstream.

@mkuklis mkuklis closed this Feb 17, 2025
@mkuklis
Copy link
Author

mkuklis commented Feb 17, 2025

Thank you @kevinmcconnell! I'm going to close this PR. Thank you for your work. I think this will be an exciting addition!

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 this pull request may close these issues.

4 participants