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

Resolve RequestMatcher at request-time #13850

Closed
Tracked by #13568
jzheaux opened this issue Sep 20, 2023 · 0 comments
Closed
Tracked by #13568

Resolve RequestMatcher at request-time #13850

jzheaux opened this issue Sep 20, 2023 · 0 comments
Assignees
Milestone

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Sep 20, 2023

In circumstances where Spring MVC is deployed only to the root servlet (/), then there is no information lost when a path is specified in request matchers:

http
    .authorizeHttpRequests((authorize) -> authorize
        .requestMatchers("/path").hasAuthority("path:read")
    )
    // ...

Whether the above /path points to Spring MVC or not can be determined at request time by inspecting which servlet the request resolves to.

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

No branches or pull requests

2 participants