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

CORS mappings allowedOrigins not parsed properly #12821

Closed
okoskine opened this issue Dec 21, 2022 · 1 comment · Fixed by #13204
Closed

CORS mappings allowedOrigins not parsed properly #12821

okoskine opened this issue Dec 21, 2022 · 1 comment · Fixed by #13204
Assignees

Comments

@okoskine
Copy link

Expected Behavior

Allowed origins for CORS mappings should be obeyed. E.g.

grails:
   cors:
       enabled: true
       mappings:
           '[/a/**]':
               allowedOrigins:
                   - https://a.example.com
                   - https://a.example.org
           '[/b/**]':
               allowedOrigins:
                   - https://b.example.com
                   - https://b.example.org

Actual Behaviour

The allowedOrigins list is not found in the config (instead the list items are indexed there separately):
image
=> All CORS mappings use the default (*) allowedOrigins.
image

Steps To Reproduce

  1. grails create-app cors
  2. add cors mappings with allowedOrigins to application.yml

Environment Information

  • Operating System: Linux
  • JDK Version: 1.8.0_352

Example Application

https://github.com/okoskine/grails5-cors-config-issue

Version

5.2.5

@puneetbehl
Copy link
Contributor

I think it is duplicate of #12719

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

Successfully merging a pull request may close this issue.

3 participants