Skip to content

Commit 3cca4a8

Browse files
committed
Fix redirect to /auth-error when using context-path
1 parent 73ea707 commit 3cca4a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/eu/openanalytics/containerproxy/auth/impl/OpenIDAuthenticationBackend.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void configureHttpSecurity(HttpSecurity http, AuthorizedUrl anyRequestCon
115115
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response,
116116
AuthenticationException exception) throws IOException, ServletException {
117117
log.error(exception);
118-
response.sendRedirect("/auth-error");
118+
response.sendRedirect(ServletUriComponentsBuilder.fromCurrentContextPath().path("/auth-error").build().toUriString());
119119
}
120120

121121
})

0 commit comments

Comments
 (0)