diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderHandler.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderHandler.java index 0b3a8bedd8..61e825d02b 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderHandler.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderHandler.java @@ -62,8 +62,8 @@ public class HostHeaderHandler extends ScopedHandler { // Different from customizer -- empty is ok here validHosts.add(""); try { - validHosts.add(InetAddress.getLocalHost().getHostName()); - validHosts.add(InetAddress.getLocalHost().getHostName() + ":" + serverPort); + validHosts.add(InetAddress.getLocalHost().getHostName().toLowerCase()); + validHosts.add(InetAddress.getLocalHost().getHostName().toLowerCase() + ":" + serverPort); } catch (final Exception e) { logger.warn("Failed to determine local hostname.", e); } diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderSanitizationCustomizer.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderSanitizationCustomizer.java index 5a10610246..3a7b22b2e9 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderSanitizationCustomizer.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderSanitizationCustomizer.java @@ -55,8 +55,8 @@ public class HostHeaderSanitizationCustomizer implements HttpConfiguration.Custo validHosts.add("localhost"); validHosts.add("localhost:" + serverPort); try { - validHosts.add(InetAddress.getLocalHost().getHostName()); - validHosts.add(InetAddress.getLocalHost().getHostName() + ":" + serverPort); + validHosts.add(InetAddress.getLocalHost().getHostName().toLowerCase()); + validHosts.add(InetAddress.getLocalHost().getHostName().toLowerCase() + ":" + serverPort); } catch (final Exception e) { logger.warn("Failed to determine local hostname.", e); }