Skip to content

Conversation

yavor300
Copy link
Contributor

@yavor300 yavor300 commented Jun 6, 2025

Use LinkedHashMap for CORS configurations to preserve insertion order

Preserving the insertion order of CORS configurations ensures consistent behavior when resolving matching paths.
This change addresses the issue where unordered HashMap usage could result in inconsistent matching behavior.

Fixes spring-cloud/spring-cloud-gateway#3805

@yavor300 yavor300 force-pushed the fixes-gh-3805-linkedhashmap-global-cors-configurations-application-listener branch from 3d37419 to 98f103c Compare June 6, 2025 10:16
@ryanjbaxter
Copy link
Contributor

Can you submit this against the 4.1.x branch? We can merge it forward from there.

@yavor300 yavor300 changed the base branch from main to 4.1.x June 18, 2025 20:55
yavor300 added 3 commits June 19, 2025 11:50
…tionListener to preserve insertion order. Fixes spring-cloudGH-3805.

Signed-off-by: Yavor Chamov <[email protected]>
…tionListener to preserve insertion order. Fixes spring-cloudGH-3805.

Signed-off-by: Yavor Chamov <[email protected]>
…tionListener to preserve insertion order. Fixes spring-cloudGH-3805.

Signed-off-by: Yavor Chamov <[email protected]>
@yavor300 yavor300 force-pushed the fixes-gh-3805-linkedhashmap-global-cors-configurations-application-listener branch from a04b4bc to efa9e1d Compare June 19, 2025 08:50
@yavor300
Copy link
Contributor Author

Changed base branch to 4.1.x

…tionListener to preserve insertion order. Fixes spring-cloudGH-3805.

Signed-off-by: Yavor Chamov <[email protected]>
@ryanjbaxter
Copy link
Contributor

The tests are still failing

yavor300 added 2 commits June 20, 2025 01:51
…tionListener to preserve insertion order. Fixes spring-cloudGH-3805.

Signed-off-by: Yavor Chamov <[email protected]>
…tionListener to preserve insertion order. Fixes spring-cloudGH-3805.

Signed-off-by: Yavor Chamov <[email protected]>
@ryanjbaxter ryanjbaxter merged commit a8b682e into spring-cloud:4.1.x Jun 20, 2025
2 checks passed
@yavor300 yavor300 deleted the fixes-gh-3805-linkedhashmap-global-cors-configurations-application-listener branch June 20, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CorsGatewayFilterApplicationListener loses CORS path priority due to unordered HashMap use
3 participants