Skip to content

Add custom ServerHttpHeadersWriter to HeadersSpec #7636

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

Closed
rwinch opened this issue Nov 7, 2019 · 5 comments
Closed

Add custom ServerHttpHeadersWriter to HeadersSpec #7636

rwinch opened this issue Nov 7, 2019 · 5 comments
Assignees
Labels
in: config An issue in spring-security-config type: enhancement A general enhancement
Milestone

Comments

@rwinch
Copy link
Member

rwinch commented Nov 7, 2019

Summary

We should add the ability to have a custom ServerHttpHeadersWriter to HeaderSpec.

@Bean
SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
	http
		// ...
		.headers(headers ->
			headers
				.writer(serverHttpHeadersWriter)
		);
	return http.build();
}
@rwinch rwinch added in: config An issue in spring-security-config type: enhancement A general enhancement status: ideal-for-contribution An issue that we actively are looking for someone to help us with labels Nov 7, 2019
@ankurpathak
Copy link
Contributor

@rwinch I would like to take this one.

@jzheaux jzheaux removed the status: ideal-for-contribution An issue that we actively are looking for someone to help us with label Nov 14, 2019
@jzheaux
Copy link
Contributor

jzheaux commented Nov 14, 2019

It's yours, @ankurpathak!

@jzheaux
Copy link
Contributor

jzheaux commented Dec 3, 2019

Hi, @ankurpathak, will you still be able to take a look at this?

@ankurpathak
Copy link
Contributor

@jzheaux I will submit pr in this week

@ankurpathak
Copy link
Contributor

@jzheaux @rwinch Here is a pull request for the issue:
#8028
@jzheaux Sorry for the delayed work as I got busy with my professional project.

ankurpathak pushed a commit to ankurpathak/spring-security that referenced this issue Feb 27, 2020
Add the ability to have a custom ServerHttpHeadersWriter to HeaderSpec
Fixes spring-projectsgh-7636
@rwinch rwinch closed this as completed in 480c5bc Feb 27, 2020
rwinch added a commit that referenced this issue Feb 27, 2020
Assert.notNull(Object,Supplier) is for when then message passed in
requires concatenation and avoids doing extra work. Since this does
not require concatenation, we can use Assert.notNull(Object,String)

Issue gh-7636
@rwinch rwinch self-assigned this Feb 27, 2020
@rwinch rwinch added this to the 5.3.0 milestone Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants