Skip to content

Commit 937cddb

Browse files
authored
Merge pull request #92 from johannesg/use-set-header-instead-of-add
Use setHeader() instead of addHeader() to avoid multiple headers being set
2 parents 93ed4cd + ea312c8 commit 937cddb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

htmx-spring-boot/src/main/java/io/github/wimdeblauwe/htmx/spring/boot/security/HxRefreshHeaderAuthenticationEntryPoint.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public HxRefreshHeaderAuthenticationEntryPoint() {
2525

2626
@Override
2727
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
28-
response.addHeader("HX-Refresh", "true");
28+
response.setHeader("HX-Refresh", "true");
2929
forbiddenEntryPoint.commence(request, response, authException);
3030
}
3131
}

0 commit comments

Comments
 (0)