This is an automated email from the ASF dual-hosted git repository.
more pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git
The following commit(s) were added to refs/heads/master by this push:
new 4db6236 KNOX-2476 - Fix issue with X-Forwarded-Context header when
there is a failover (#389)
4db6236 is described below
commit 4db62361575bfad3986cee013e6e7f0cab570431
Author: Sandeep Moré <[email protected]>
AuthorDate: Tue Dec 1 16:10:52 2020 -0500
KNOX-2476 - Fix issue with X-Forwarded-Context header when there is a
failover (#389)
---
.../src/main/java/org/apache/knox/gateway/dispatch/NiFiRequestUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/gateway-service-nifi/src/main/java/org/apache/knox/gateway/dispatch/NiFiRequestUtil.java
b/gateway-service-nifi/src/main/java/org/apache/knox/gateway/dispatch/NiFiRequestUtil.java
index 544cde6..8c45123 100644
---
a/gateway-service-nifi/src/main/java/org/apache/knox/gateway/dispatch/NiFiRequestUtil.java
+++
b/gateway-service-nifi/src/main/java/org/apache/knox/gateway/dispatch/NiFiRequestUtil.java
@@ -43,7 +43,7 @@ class NiFiRequestUtil {
final Header originalXForwardedContextHeader =
outboundRequest.getFirstHeader(NiFiHeaders.X_FORWARDED_CONTEXT);
if (originalXForwardedContextHeader != null) {
String xForwardedContextHeaderValue =
originalXForwardedContextHeader.getValue();
- if (xForwardedContextHeaderValue != null &&
!xForwardedContextHeaderValue.isEmpty()) {
+ if (xForwardedContextHeaderValue != null &&
!xForwardedContextHeaderValue.isEmpty() &&
!xForwardedContextHeaderValue.contains("nifi-app")) {
// Inspect the inbound request and outbound request to determine the
additional context path from the rewrite
// rules that needs to be added to the X-Forwarded-Context header to
allow proper proxying to NiFi.
//