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

Support plugins on a per endpoint (and HTTP method?) basis #160

Closed
nijikokun opened this issue Apr 24, 2015 · 12 comments
Closed

Support plugins on a per endpoint (and HTTP method?) basis #160

nijikokun opened this issue Apr 24, 2015 · 12 comments
Assignees
Labels
idea/new plugin [legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports.

Comments

@nijikokun
Copy link
Contributor

Right now plugins encompass the entire API, meaning that they are invoked for every endpoint.

An amazing feature would be to allow specifying specific endpoints that the plugin works for, should no endpoints be specified it encompasses the entire API.

This shouldn't be done on a per plugin basis as that is not a DRY approach and would require each plugin to do additional work. The check should happen before the plugin is invoked.

@sonicaghi
Copy link
Member

should be in the KONG RESTful interface?

@nijikokun
Copy link
Contributor Author

This also means allowing to configure the same plugin for the same API multiple times.

Examples:

  • CORS Config A on API A on endpoints A, D
  • CORS Config B on API A on endpoints B, C
  • Keyauth Config A on API A on endpoints A, C
  • Keyauth Config A on API A on endpoints D
  • Queryauth Config A on API A on endpoints B

@montanaflynn
Copy link

+1

@nijikokun
Copy link
Contributor Author

I should also add that certain plugins could also be per method as well.

@subnetmarco subnetmarco added this to the 0.3.0 milestone May 12, 2015
@subnetmarco subnetmarco self-assigned this May 12, 2015
@sonicaghi
Copy link
Member

@thefosk is this happening in the coming 0.3?

@subnetmarco subnetmarco modified the milestones: 0.3.1, 0.3.0 Jun 2, 2015
@subnetmarco
Copy link
Member

Not in 0.3.0, but could happen in 0.3.1or subsequent release

@thibaultcha thibaultcha removed this from the 0.3.1 milestone Jun 8, 2015
@sonicaghi
Copy link
Member

+1

1 similar comment
@morphomatt
Copy link

+1

@subnetmarco
Copy link
Member

This feature should also enable plugins not just per endpoint, but per HTTP method too. Like:

curl 127.0.0.1:8001/apis/test.com/plugins/
     -d "name=keyauth" \
     -d "path=/hello/*/world/*" \
     -d "method=POST, DELETE"

@subnetmarco subnetmarco added proxy idea/new plugin [legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports. labels Jul 15, 2015
@thibaultcha thibaultcha removed the proxy label Aug 17, 2015
@montanaflynn
Copy link

What's the status on this? I see it was removed from the 0.3.1 milestone, is it still a planned feature?

One more thing to be brought up is support for wildcards or regex when applying to endpoints.

@sonicaghi
Copy link
Member

@montanaflynn the milestones are here now: https://github.com/Mashape/kong/wiki

@subnetmarco subnetmarco changed the title Support plugins on a per endpoint basis Support plugins on a per endpoint (and HTTP method?) basis Aug 21, 2015
@subnetmarco
Copy link
Member

Closed in favor of #505.

hutchic pushed a commit that referenced this issue Jun 10, 2022
### Summary

#### libyaml 0.2.2 release

- #95 -- build: do not install config.h
- #97 -- appveyor.yml: fix Release build
- #103 -- Remove unused code in yaml_document_delete
- #104 -- Allow colons in plain scalars inside flow collections
- #109 -- Fix comparison in tests/run-emitter.c
- #117 -- Fix typo error
- #119 -- The closing single quote needs to be indented...
- #121 -- fix token name typos in comments
- #122 -- Revert removing of open_ended after top level plain scalar
- #125 -- Cherry-picks from PR 27
- #135 -- Windows/C89 compatibility
- #136 -- allow override of Windows static lib name

#### libyaml 0.2.3 release

- #130 Fixed typo.
- #144 Fix typo in comment
- #140 Use pointer to const for strings that aren't/shouldn't be modified
- #128 Squash a couple of warnings in example-deconstructor-alt
- #151 Fix spelling for error message
- #161 Make appveyor config be a hidden file
- #159 Add CHANGES file
- #160 Always output document end before directive (YAML 1.2 compatibility)
- #162 Output document end marker after open ended scalars
- #157 change cmake target name from libOFF.a to libyaml.a
- #155 include/yaml.h: fix comments
- #169 Fixed missing token in example
- #127 Avoid recursion in the document loader.
- #172 Support %YAML 1.2 directives
- #66 Change dllexport controlling macro to use _WIN32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea/new plugin [legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports.
Projects
None yet
Development

No branches or pull requests

6 participants