CORS Not Working


Have configured Allowed Headers in Cors plugin, but i’m not able to get Access-Control-Allow-Headers in response, due to which options pre-flight call is failing.

Is there any thing wrong on the cors plugin, or do i have to configure any other parameter.

FYI, have tried enabling cors plugin on route and as well as service, dint work.

Which kong version do you use? And do you use Kong Ingress Controller?
Please give more information about your configuration. It is better to get quick help.

Kong version : 2.0.3
Its community edition, installed on ubuntu with postgress

And could you show me the cors configuration? In my kong, cors plugin config is following below:

kind: KongPlugin
  name: demo-cors
  namespace: default
    - HEAD
    - GET
    - POST
    - PUT
    - PATCH
    - DELETE
    - Authorization
    - Content-Type
    - "*"
  credentials: true
plugin: cors

Please ensure that you have enable the plugin on a Kubernetes service or Ingress resource.
The following guide should help:

Would you share the error ?

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ