Kong #13295
Kong
#13295
-
Beta Was this translation helpful? Give feedback.
Answered by
hanshuebner
Jun 28, 2024
Replies: 1 comment 1 reply
-
@stiti-bacem In order to restrict a plugin to specific HTTP methods, you can create a separate route for _format_version: "2.1"
services:
- name: example-service
url: http://web
routes:
- name: post-route
paths:
- /
methods:
- POST
plugins:
- name: response-transformer
config:
add:
json:
- "hello: world"
- name: default-route
paths:
- / |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is possible to do this using a plugin that is attached to the route. If you don't want to do that, you'll need a custom plugin.