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

Kong Cors Plugin - unable to add multiple url in the origins config #13919

Open
1 task done
carmine-ianniello-deltatre opened this issue Nov 25, 2024 · 0 comments
Open
1 task done

Comments

@carmine-ianniello-deltatre

Is there an existing issue for this?

  • I have searched the existing issues

Kong version ($ kong version)

KIC 3.1

Current Behavior

Hello,

I'm using Kong ingress controller 3.1 version with the Cors plugin configured as below.
When I use it with a single origin in the config field, everything works as expected, as shown in the image below.

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: kong-cors-custom
config:
  origins:
  - first-url.com
  - second-url.com
  credentials: true
  max_age: 3600
  preflight_continue: false
plugin: cors

image

But when I try to add another origin, the Allow-Control-Allow-Origins header disappears, not allowing neither the first URL.

From my understanding the plugin should be able to add multiple origins URLs, is that right?

image

Expected Behavior

I'm expecting to be able to allow multiple URL with cors plugin

Steps To Reproduce

  • Create the cors plugin in yaml format
  • add 2 or more hostname in the origins config
  • check the header in the Response headers

Anything else?

No response

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

1 participant