Describe the bug
When using CORS configuration on Route, it can be defined using metadata.cors property on route configuration as defined in documentation.
If properties are defined in Kebab case, it does not work as expected.
This is probably because CorsGatewayFilterApplicationListener's method private Optional<Object> findValue(Map<String, Object> metadata, String key) simply returns the value based on Keys which are only given in Camel case not Kebab case.
However, it works as expected when properties are defined in camel case but it look weird that some properties are only supported in camel case not Kebab case.
Describe the bug When using CORS configuration on Route, it can be defined using
metadata.cors
property on route configuration as defined in documentation.If properties are defined in Kebab case, it does not work as expected.
Sample
This is probably because
CorsGatewayFilterApplicationListener
's methodprivate Optional<Object> findValue(Map<String, Object> metadata, String key)
simply returns the value based on Keys which are only given in Camel case not Kebab case.However, it works as expected when properties are defined in camel case but it look weird that some properties are only supported in camel case not Kebab case.