-
Notifications
You must be signed in to change notification settings - Fork 6k
HeaderWriterFilter writes headers at beginning #6509
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
@jzheaux I am not getting any Idea for tests. Please give some idea how I can write test. |
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, again, @ankurpathak! I've left some feedback inline.
web/src/main/java/org/springframework/security/web/header/HeaderWriterFilter.java
Outdated
Show resolved
Hide resolved
web/src/main/java/org/springframework/security/web/header/HeaderWriterFilter.java
Outdated
Show resolved
Hide resolved
web/src/main/java/org/springframework/security/web/header/HeaderWriterFilter.java
Outdated
Show resolved
Hide resolved
web/src/main/java/org/springframework/security/web/header/HeaderWriterFilter.java
Show resolved
Hide resolved
9b02d1b
to
0d805ba
Compare
@@ -565,4 +567,20 @@ class HeadersConfigurerTests extends BaseSpringSpec { | |||
responseHeaders == ['Strict-Transport-Security': 'max-age=31536000 ; includeSubDomains ; preload'] | |||
} | |||
|
|||
def "headers written at beginning of request"() { |
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.
Please make this a Java test. We are in the process of coverting the Groovy tests over to Java, so we don't want to make more work for ourselves.
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.
Done.
...ork/security/config/annotation/authentication/configurers/HeadersConfigurerTestsConfigs.java
Outdated
Show resolved
Hide resolved
0d805ba
to
691a4d9
Compare
Add support for HeaderWriterFilter to write headers at the beginning of the request Fixes: spring-projectsgh-6501
691a4d9
to
150ff3e
Compare
@ankurpathak Thanks for the PR! This is now merged into Also, I added a polish commit of 2b960b0 for the Java Config test - please take a look at the commit message for future reference. |
Add support for HeaderWriterFilter to write headers at the beginning of the request
Fixes: gh-6501