taz1988 commented on code in PR #11335:
URL: https://github.com/apache/nifi/pull/11335#discussion_r3407632253


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/ProxyHeaderValidatorCustomizer.java:
##########
@@ -95,11 +98,14 @@ private void processProxyHostHeaders(final Request request) 
{
 
         final HttpFields requestHeaders = request.getHeaders();
         for (final String proxyHostHeader : SUPPORTED_PROXY_HOST_HEADERS) {
-            final String hostHeader = requestHeaders.get(proxyHostHeader);
+            String hostHeader = requestHeaders.get(proxyHostHeader);
             // Include empty and blank values for enforced validation of 
request headers
             if (hostHeader == null) {
                 continue;
             }
+
+            hostHeader = HOST_PORT_SEPARATOR.split(hostHeader)[0];

Review Comment:
   Yeah, I will modify the code. I guess the best would be that if host is 
matched and port is detected, then we call the HostPortValidatorCustomizer to 
finish port validation?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to