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

Update HandlerMappingIntrospector Usage in CORS support #35

Open
wants to merge 1 commit into
base: gh-16429
Choose a base branch
from

Conversation

evgeniycheban
Copy link

Copy link
Owner

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @evgeniycheban! I left a comment inline. Also, gh-16429 has been merged, so would you please open a new PR in Spring Security?

return new CorsFilter(mappingIntrospector);
PreFlightRequestHandler mappingIntrospector = context.getBean(HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME,
PreFlightRequestHandler.class);
return new CorsFilter((CorsConfigurationSource) mappingIntrospector);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do a safe cast here, and then throw an exception if it isn't of the right type.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to look up for CorsConfigurationSource?

@evgeniycheban
Copy link
Author

@jzheaux I opened a PR to Spring Security repository

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 this pull request may close these issues.

2 participants