biplane icon indicating copy to clipboard operation
biplane copied to clipboard

plugins dump

Open mrafieee opened this issue 8 years ago • 1 comments

I have a plugin which is applied to all endpoints but in my dump file it does not show up, do we have a high level plugins section like what we have currently for apis and consumers?

mrafieee avatar Jun 23 '17 18:06 mrafieee

Plugins are strange in that the are nested under the APIs that they apply to. i.e. you add plugins to an API endpoint. So they are always supposed to be nested against their respective API definitions.

Example:

---
apis:
  - name: my_endpoint
    attributes:
      request_path: /my_cool_service
      strip_request_path: true
      upstream_url: http://coolservice.dev.articulate.com/service_endpoint
    plugins:
      - name: acl
        attributes:
          config:
            whitelist: google-auth
      - name: jwt
        attributes:
          config:
            key_claim_name: aud
            uri_param_names: jwt
            claims_to_verify: exp
            secret_is_base64: false
      - name: cors
        attributes:
          config:
            credentials: false
            preflight_continue: false
            origin: *
      - name: response-transformer
        attributes:
          config:
            add:
              headers: X-Content-Type-Options:nosniff

You can see the plugins are listed in the plugins: secton under the my_endpoint api definition.

Which version of Kong are you using this against?

plukevdh avatar Jun 23 '17 19:06 plukevdh