-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Introduced DispatcherType request matcher #9278
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
Conversation
ecdacdc
to
3b667a5
Compare
7265c86
to
6f0975d
Compare
3947552
to
6e0890e
Compare
FYI - checks are passing now. (sorry for the noise -- struggling to get my local checkstyle/checkformat config to match up w/ the project) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nmck257!
I have left some feedback inline.
.../java/org/springframework/security/config/annotation/web/AbstractRequestMatcherRegistry.java
Show resolved
Hide resolved
.../java/org/springframework/security/config/annotation/web/AbstractRequestMatcherRegistry.java
Outdated
Show resolved
Hide resolved
Created a DispatcherTypeRequestMatcher and corresponding methods for configuring an HttpSecurity object. This enables filtering of security rules based on the dispatcher type of the incoming servlet request. Closes spring-projectsgh-9205
- Removed duplicative code for transforming String into HttpMethod - Removed an unnecessary array initialization
6e0890e
to
b432530
Compare
Thanks @nmck257! Are you interested in submitting a similar PR for the server equivalent? |
Sure @eleftherias -- I should have time to do so a little later this week. |
@eleftherias - want to make sure I understand the intent for the The But, I do see that if a request is adapted through So... is that the scope? The new matcher should check whether the incoming request is an |
Thanks for pointing that out @nmck257. I was too quick to assume that there should be a server equivalent, when in fact this doesn't make sense for server based applications. Sorry about the confusion and thank you for setting us on the right track. |
Got it - no worries. Thanks @eleftherias ! |
What do you mean by this? The PR says
"incoming servlet request" → server Why is this not for server? I don't understand that. |
|
Created a DispatcherTypeRequestMatcher and corresponding methods
for configuring an HttpSecurity object. This enables filtering of
security rules based on the dispatcher type of the incoming servlet
request.
Additionally, removed duplicative code for parsing HttpMethod objects
from the AntPathRequestMatcher and RegexRequestMatcher.
Closes gh-9205