You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Able to configure multiple cors mappings in runtime.groovy
Able to use Spring Boot cors setting allowedOriginPatterns
Actual Behaviour
Attempting to configure mappings in runtime.groovy in the style recommended here: #12719 (comment) I am unable to get working in 6.2.0. Debugging the code I can see the URL paths have lost the special characters (slashes) which I think is leading to them not being picked up.
Using yaml config the slashes appear in the keys shown. I did try various other groovy syntax to see if I could preserve the path properly but wasn't able to get it working.
It would be good to find out whether I'm doing something wrong or if this is a bug/improvement, then if there is any possibility of a fix in V6. Thanks
Steps To Reproduce
Grails 6.2.0
Configuring Cors with multiple urls mappings and wildcard subdomains in runtime.groovy.
Expected Behavior
Actual Behaviour
Attempting to configure mappings in runtime.groovy in the style recommended here: #12719 (comment) I am unable to get working in 6.2.0. Debugging the code I can see the URL paths have lost the special characters (slashes) which I think is leading to them not being picked up.
Using yaml config the slashes appear in the keys shown. I did try various other groovy syntax to see if I could preserve the path properly but wasn't able to get it working.
In addition I am trying to use the Spring setting allowedOriginPatterns to support wildcard subdomains however it doesn't appear to work. Looking at https://github.com/grails/grails-core/blob/c0ac9667e5d55db544cd62155ad17f8322ca1b25/grails-web-url-mappings/src/main/groovy/grails/web/mapping/cors/GrailsCorsConfiguration.groovy I seems like that setting isn't processed but I cannot find another way to utilise that style of CORS config.
It would be good to find out whether I'm doing something wrong or if this is a bug/improvement, then if there is any possibility of a fix in V6. Thanks
Steps To Reproduce
Grails 6.2.0
Configuring Cors with multiple urls mappings and wildcard subdomains in runtime.groovy.
For example:
or
Environment Information
Example Application
No response
Version
6.2.0
The text was updated successfully, but these errors were encountered: