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 priority order for API routing rules #846

Closed
ahmadnassri opened this issue Jan 7, 2016 · 6 comments
Closed

add priority order for API routing rules #846

ahmadnassri opened this issue Jan 7, 2016 · 6 comments

Comments

@ahmadnassri
Copy link
Contributor

currently there's no clear order for which routes are executed first (specifically when using request_path) a priority / order property will determine the order in which to check for matching routes.

@thibaultcha
Copy link
Member

The order is clear and described here. Priority with path is already in #369.

@ahmadnassri
Copy link
Contributor Author

#369 should be one ticket (per the title), the regex one another ticket and now this ... doubt they should / could be all done together.

@thibaultcha
Copy link
Member

Its goal is simply to group the future requirements for path improvements instead of spreading them over 3 different issues. Title can be updated and check-list added.

@ahmadnassri ahmadnassri added the BC label May 13, 2016
@thibaultcha thibaultcha removed the BC label Sep 1, 2016
@driverpt
Copy link

driverpt commented Sep 7, 2016

It would be nice to have an extra implicit parameter when activating the plugin for a certain API, like config.order=2 as an example, in which the default adds to the tail.

e.g.:

curl -X POST http://kong:8001/apis/{api}/plugins \
    --data "name=oauth2" \
    --data "order=2" \ 
    --data "config.scopes=email,phone,address" \
    --data "config.mandatory_scope=true"

This would cause to add oauth2 plugin to the Number 2 position in the Execution Order.

If there would be 3 plugins registered, that would mean that the positions 2 and 3 would be pushed to 3 and 4.

What do you think @thibaultcha

@djMax
Copy link

djMax commented Sep 27, 2016

It would seem to be easier to just make the priority come from config with a default. But that's not enough, because the plugin also needs to know that it should "let requests go" even without auth. We did some of this in our fork, but not in a general way. https://github.com/Mashape/kong/compare/release/0.9.2...gas-buddy:js_next?expand=1#diff-29de4a819d2ea94f4d6f15ab1d280c72R450

@thibaultcha
Copy link
Member

thibaultcha commented Mar 9, 2017

Closing this since the new router defines its own priorities and those are documented in the new router guide:

https://getkong.org/docs/0.10.x/proxy/

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

No branches or pull requests

4 participants