-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix CORS configuration timing issue with RedisRouteDefinitionRepository and RefreshRoutesEvent #3778
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
Fix CORS configuration timing issue with RedisRouteDefinitionRepository and RefreshRoutesEvent #3778
Conversation
f9a1115
to
6ae1a4c
Compare
Could you submit this PR agains the 4.1.x branch? |
6ae1a4c
to
3f18f6c
Compare
Sure, it's done. |
Can you merge in the latest changes from main? |
3f18f6c
to
3787cf4
Compare
I'm not sure if that was what you wanted me to do. I rebased against 4.1.x and merged into the main branch. Doesn't seem quite right - does it? |
You have to force push |
I realize your branch was still based on main, and luckily the changes merge cleanly into 4.1.x. I just wanted you to pull in the latest changes from main into your fork so the build passes and we make sure nothing else broke. |
Configure CORS after refresh routes completed on RefreshRoutesResultEvent Signed-off-by: PeterMue <[email protected]>
3787cf4
to
8a98421
Compare
I again rebased mine one the upstream spring-cloud:4.1.x branch. If that's still not right, you have to explain me what i should do, i'm a little confused right now. |
looks better thanks |
CORS configuration is based on outdated RouteDefinitions when using Redis and RefreshRoutesEvent, see gh-3774.
Changing the event type in CorsGatewayFilterApplicationListener to use the RefreshRoutesResultEvent ensures the CORS configuration happens after the reload of the definitions completed and the RouteLocator contains the latest RouteDefinitions.