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

Routing by path #164

Closed
Salmondx opened this issue Sep 22, 2016 · 2 comments
Closed

Routing by path #164

Salmondx opened this issue Sep 22, 2016 · 2 comments
Milestone

Comments

@Salmondx
Copy link

Hi,
I have a question and didn't found a solution in docs.
Is it possible in fabio to pass to service only path variables after urlprefix?
E.g. I've got a service test-service with urlpreifx-/test-service.
And now i want to send http request like this:
http localhost:9999/test-service/test/api
I only want to pass /test/api part, not the whole path, and fabio does the second.

In nginx i can add / after a location path and all path variables will be propagated except one that used for routing.

@magiconair
Copy link
Contributor

Fabio does not support path stripping right now. There is a ticket open for this where you can read the reasoning. I'm probably going to add this in the future but I'm going to focus on other things first.

magiconair added a commit that referenced this issue Dec 21, 2016
This patch adds support for a 'strip=/path' option which will remove
/path from the front of the outgoing request path. For 'strip=/foo'
a request to '/foo/bar' will be matched on '/foo/bar' but forwarded
as '/bar'.

Fixes: #44, #124, #164
@magiconair
Copy link
Contributor

I'm closing this as a duplicate of #44. Change for path stripping is in progress. See branch.

magiconair added a commit that referenced this issue Jan 17, 2017
This patch adds support for a 'strip=/path' option which will remove
/path from the front of the outgoing request path. For 'strip=/foo'
a request to '/foo/bar' will be matched on '/foo/bar' but forwarded
as '/bar'.

Fixes: #44, #124, #164
magiconair added a commit that referenced this issue Jan 17, 2017
This patch adds support for a 'strip=/path' option which will remove
/path from the front of the outgoing request path. For 'strip=/foo'
a request to '/foo/bar' will be matched on '/foo/bar' but forwarded
as '/bar'.

Fixes: #44, #124, #164
magiconair added a commit that referenced this issue Jan 17, 2017
This patch adds support for a 'strip=/path' option which will remove
/path from the front of the outgoing request path. For 'strip=/foo'
a request to '/foo/bar' will be matched on '/foo/bar' but forwarded
as '/bar'.

Fixes: #44, #124, #164
@magiconair magiconair added this to the 1.3.7 milestone Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants