mirror of
https://github.com/apache/nifi.git
synced 2025-02-09 11:35:05 +00:00
NIFI-8242 Ensure NiFi URL for redirects has a trailing slash in AccessResource
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #4834.
This commit is contained in:
parent
51e7bdf940
commit
6ed496c714
@ -1611,11 +1611,13 @@ public class AccessResource extends ApplicationResource {
|
|||||||
private String getNiFiUri() {
|
private String getNiFiUri() {
|
||||||
final String nifiApiUrl = generateResourceUri();
|
final String nifiApiUrl = generateResourceUri();
|
||||||
final String baseUrl = StringUtils.substringBeforeLast(nifiApiUrl, "/nifi-api");
|
final String baseUrl = StringUtils.substringBeforeLast(nifiApiUrl, "/nifi-api");
|
||||||
return baseUrl + "/nifi";
|
// Note: if the URL does not end with a / then Jetty will end up doing a redirect which can cause
|
||||||
|
// a problem when being behind a proxy b/c Jetty's redirect doesn't consider proxy headers
|
||||||
|
return baseUrl + "/nifi/";
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getNiFiLogoutCompleteUri() {
|
private String getNiFiLogoutCompleteUri() {
|
||||||
return getNiFiUri() + "/logout-complete";
|
return getNiFiUri() + "logout-complete";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeOidcRequestCookie(final HttpServletResponse httpServletResponse) {
|
private void removeOidcRequestCookie(final HttpServletResponse httpServletResponse) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user