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

Default StripPrefix to 1 instead of 0 #2033

Closed
csterwa opened this issue Nov 9, 2020 · 1 comment · May be fixed by #2035
Closed

Default StripPrefix to 1 instead of 0 #2033

csterwa opened this issue Nov 9, 2020 · 1 comment · May be fixed by #2035
Milestone

Comments

@csterwa
Copy link

csterwa commented Nov 9, 2020

Inconvenience

So far we have seen it is most common to develop an API with paths relative to root and then add a prefix path to the Gateway. For example, when creating an OrderService with an API at GET /list it could be accessed in a Gateway as GET /order/list. If the OrderService were to have many other API endpoints with different route configurations then StripPrefix=1 would have to be added to each route.

Proposed Solution

Default StripPrefix to 1 instead of its current default of 0. Given that the above Gateway to service API prefix of routes is common approach, this would reduce the need to duplicate StripPrefix=1 across all routes perhaps across a number of route configurations.

@spencergibb
Copy link
Member

I agree that we can change the default to 1, but the reason above doesn't make much sense. You'll still need StripPrefix instead of StripPrefix=1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants