Skip to content

Commit 9d063d0

Browse files
committed
Use absolute URL to solve the ingress issue on prod and stage1
1 parent fa8c77b commit 9d063d0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/org/apereo/cas/config/CasWebAppConfiguration.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
* This is {@link CasWebAppConfiguration}.
3838
*
3939
* @author Misagh Moayyed
40+
* @author Longze Chen
4041
* @since 5.0.0
4142
*/
4243
@Configuration(value = "casWebAppConfiguration", proxyBeanMethods = false)
@@ -100,7 +101,9 @@ protected ModelAndView handleRequestInternal(final HttpServletRequest request,
100101
val queryString = request.getQueryString();
101102
val url = request.getContextPath() + "/login"
102103
+ Optional.ofNullable(queryString).map(string -> '?' + string).orElse(StringUtils.EMPTY);
103-
return new ModelAndView(new RedirectView(response.encodeURL(url)));
104+
// OSF CAS Customization: use absolute URL to temporarily solve the ingress issue on staging1 and prod.
105+
val fullUrl = casProperties.getServer().getName() + url;
106+
return new ModelAndView(new RedirectView(response.encodeURL(fullUrl)));
104107
}
105108
};
106109
}

0 commit comments

Comments
 (0)