From 6d2f88ed9ba196ed04ecfcc0cc10cbcb267f155f Mon Sep 17 00:00:00 2001 From: Venil Noronha Date: Sat, 9 Apr 2016 15:41:59 +0530 Subject: [PATCH 1/2] Support max-http-header-size & max-http-post-size Add `server.max-http-header-size` and `server.max-http-post-size` properties and deprecate `server.tomcat.max-http-header-size`. Fixes gh-5637 Closes gh-5641 --- .../autoconfigure/web/ServerProperties.java | 159 +++++++++++++++++- 1 file changed, 155 insertions(+), 4 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index f9e2eb4080..54aba8bd89 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -30,6 +30,9 @@ import javax.servlet.SessionCookieConfig; import javax.servlet.SessionTrackingMode; import javax.validation.constraints.NotNull; +import io.undertow.Undertow.Builder; +import io.undertow.UndertowOptions; + import org.apache.catalina.Context; import org.apache.catalina.connector.Connector; import org.apache.catalina.valves.AccessLogValve; @@ -37,6 +40,13 @@ import org.apache.catalina.valves.RemoteIpValve; import org.apache.coyote.AbstractProtocol; import org.apache.coyote.ProtocolHandler; import org.apache.coyote.http11.AbstractHttp11Protocol; +import org.eclipse.jetty.server.ConnectionFactory; +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.HttpConfiguration; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.ContextHandler; +import org.eclipse.jetty.server.handler.HandlerCollection; +import org.eclipse.jetty.server.handler.HandlerWrapper; import org.springframework.boot.autoconfigure.web.ServerProperties.Session.Cookie; import org.springframework.boot.cloud.CloudPlatform; @@ -50,11 +60,14 @@ import org.springframework.boot.context.embedded.JspServlet; import org.springframework.boot.context.embedded.ServletContextInitializer; import org.springframework.boot.context.embedded.Ssl; import org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory; +import org.springframework.boot.context.embedded.jetty.JettyServerCustomizer; import org.springframework.boot.context.embedded.tomcat.TomcatConnectorCustomizer; import org.springframework.boot.context.embedded.tomcat.TomcatContextCustomizer; import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory; +import org.springframework.boot.context.embedded.undertow.UndertowBuilderCustomizer; import org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.DeprecatedConfigurationProperty; import org.springframework.boot.context.properties.NestedConfigurationProperty; import org.springframework.context.EnvironmentAware; import org.springframework.core.Ordered; @@ -73,6 +86,7 @@ import org.springframework.util.StringUtils; * @author Marcos Barbero * @author EddĂș MelĂ©ndez * @author Quinten De Swaef + * @author Venil Noronha */ @ConfigurationProperties(prefix = "server", ignoreUnknownFields = true) public class ServerProperties @@ -122,6 +136,16 @@ public class ServerProperties */ private String serverHeader; + /** + * Maximum size in bytes of the HTTP message header. + */ + private int maxHttpHeaderSize = 0; // bytes + + /** + * Maximum size in bytes of the HTTP post content. + */ + private int maxHttpPostSize = 0; // bytes + private Session session = new Session(); @NestedConfigurationProperty @@ -319,6 +343,22 @@ public class ServerProperties this.serverHeader = serverHeader; } + public int getMaxHttpHeaderSize() { + return this.maxHttpHeaderSize; + } + + public void setMaxHttpHeaderSize(int maxHttpHeaderSize) { + this.maxHttpHeaderSize = maxHttpHeaderSize; + } + + public int getMaxHttpPostSize() { + return this.maxHttpPostSize; + } + + public void setMaxHttpPostSize(int maxHttpPostSize) { + this.maxHttpPostSize = maxHttpPostSize; + } + protected final boolean getOrDeduceUseForwardHeaders() { if (this.useForwardHeaders != null) { return this.useForwardHeaders; @@ -612,10 +652,23 @@ public class ServerProperties this.minSpareThreads = minSpareThreads; } + /** + * Get the max http header size. + * @return the max http header size. + * @deprecated in favor of {@code server.maxHttpHeaderSize} + */ + @Deprecated + @DeprecatedConfigurationProperty(replacement = "server.maxHttpHeaderSize") public int getMaxHttpHeaderSize() { return this.maxHttpHeaderSize; } + /** + * Set the max http header size. + * @param maxHttpHeaderSize the max http header size. + * @deprecated in favor of {@code server.maxHttpHeaderSize} + */ + @Deprecated public void setMaxHttpHeaderSize(int maxHttpHeaderSize) { this.maxHttpHeaderSize = maxHttpHeaderSize; } @@ -701,8 +754,14 @@ public class ServerProperties if (this.minSpareThreads > 0) { customizeMinThreads(factory); } - if (this.maxHttpHeaderSize > 0) { - customizeMaxHttpHeaderSize(factory); + if (serverProperties.getMaxHttpHeaderSize() > 0) { + customizeMaxHttpHeaderSize(factory, serverProperties.getMaxHttpHeaderSize()); + } + else if (this.maxHttpHeaderSize > 0) { + customizeMaxHttpHeaderSize(factory, this.maxHttpHeaderSize); + } + if (serverProperties.getMaxHttpPostSize() > 0) { + customizeMaxHttpPostSize(factory, serverProperties.getMaxHttpPostSize()); } if (this.accesslog.enabled) { customizeAccessLog(factory); @@ -782,7 +841,7 @@ public class ServerProperties @SuppressWarnings("rawtypes") private void customizeMaxHttpHeaderSize( - TomcatEmbeddedServletContainerFactory factory) { + TomcatEmbeddedServletContainerFactory factory, final int maxHttpHeaderSize) { factory.addConnectorCustomizers(new TomcatConnectorCustomizer() { @Override @@ -790,13 +849,23 @@ public class ServerProperties ProtocolHandler handler = connector.getProtocolHandler(); if (handler instanceof AbstractHttp11Protocol) { AbstractHttp11Protocol protocol = (AbstractHttp11Protocol) handler; - protocol.setMaxHttpHeaderSize(Tomcat.this.maxHttpHeaderSize); + protocol.setMaxHttpHeaderSize(maxHttpHeaderSize); } } }); } + private void customizeMaxHttpPostSize( + TomcatEmbeddedServletContainerFactory factory, final int maxHttpPostSize) { + factory.addConnectorCustomizers(new TomcatConnectorCustomizer() { + @Override + public void customize(Connector connector) { + connector.setMaxPostSize(maxHttpPostSize); + } + }); + } + private void customizeAccessLog(TomcatEmbeddedServletContainerFactory factory) { AccessLogValve valve = new AccessLogValve(); valve.setPattern(this.accesslog.getPattern()); @@ -882,6 +951,62 @@ public class ServerProperties void customizeJetty(ServerProperties serverProperties, JettyEmbeddedServletContainerFactory factory) { factory.setUseForwardHeaders(serverProperties.getOrDeduceUseForwardHeaders()); + if (serverProperties.getMaxHttpHeaderSize() > 0) { + customizeMaxHttpHeaderSize(factory, serverProperties.getMaxHttpHeaderSize()); + } + if (serverProperties.getMaxHttpPostSize() > 0) { + customizeMaxHttpPostSize(factory, serverProperties.getMaxHttpPostSize()); + } + } + + private void customizeMaxHttpHeaderSize( + JettyEmbeddedServletContainerFactory factory, final int maxHttpHeaderSize) { + factory.addServerCustomizers(new JettyServerCustomizer() { + @Override + public void customize(Server server) { + org.eclipse.jetty.server.Connector[] connectors = server.getConnectors(); + for (org.eclipse.jetty.server.Connector connector : connectors) { + for (ConnectionFactory connectionFactory : connector.getConnectionFactories()) { + if (connectionFactory instanceof HttpConfiguration.ConnectionFactory) { + HttpConfiguration httpConfig = + ((HttpConfiguration.ConnectionFactory) connectionFactory) + .getHttpConfiguration(); + httpConfig.setRequestHeaderSize(maxHttpHeaderSize); + httpConfig.setResponseHeaderSize(maxHttpHeaderSize); + } + } + } + } + }); + } + + private void customizeMaxHttpPostSize( + JettyEmbeddedServletContainerFactory factory, final int maxHttpPostSize) { + factory.addServerCustomizers(new JettyServerCustomizer() { + + @Override + public void customize(Server server) { + setHandlerMaxHttpPostSize(maxHttpPostSize, server.getHandlers()); + } + + private void setHandlerMaxHttpPostSize(int maxHttpPostSize, + Handler... handlers) { + for (Handler handler : handlers) { + if (handler instanceof ContextHandler) { + ((ContextHandler) handler).setMaxFormContentSize(maxHttpPostSize); + } + else if (handler instanceof HandlerWrapper) { + setHandlerMaxHttpPostSize(maxHttpPostSize, + ((HandlerWrapper) handler).getHandler()); + } + else if (handler instanceof HandlerCollection) { + setHandlerMaxHttpPostSize(maxHttpPostSize, + ((HandlerCollection) handler).getHandlers()); + } + } + } + + }); } } @@ -986,6 +1111,32 @@ public class ServerProperties factory.setAccessLogEnabled(this.accesslog.enabled); } factory.setUseForwardHeaders(serverProperties.getOrDeduceUseForwardHeaders()); + if (serverProperties.getMaxHttpHeaderSize() > 0) { + customizeMaxHttpHeaderSize(factory, serverProperties.getMaxHttpHeaderSize()); + } + if (serverProperties.getMaxHttpPostSize() > 0) { + customizeMaxHttpPostSize(factory, serverProperties.getMaxHttpPostSize()); + } + } + + private void customizeMaxHttpHeaderSize( + UndertowEmbeddedServletContainerFactory factory, final int maxHttpHeaderSize) { + factory.addBuilderCustomizers(new UndertowBuilderCustomizer() { + @Override + public void customize(Builder builder) { + builder.setServerOption(UndertowOptions.MAX_HEADER_SIZE, maxHttpHeaderSize); + } + }); + } + + private void customizeMaxHttpPostSize( + UndertowEmbeddedServletContainerFactory factory, final int maxHttpPostSize) { + factory.addBuilderCustomizers(new UndertowBuilderCustomizer() { + @Override + public void customize(Builder builder) { + builder.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, (long) maxHttpPostSize); + } + }); } public static class Accesslog { From ea44ae6a35a912b0db9add1fb79f28b4c55e3874 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Sun, 10 Apr 2016 10:22:40 -0700 Subject: [PATCH 2/2] Polish contribution --- .../autoconfigure/web/ServerProperties.java | 77 ++++++++++++------- .../boot/autoconfigure/web/SizeThreshold.java | 52 +++++++++++++ .../web/ServerPropertiesTests.java | 6 +- .../appendix-application-properties.adoc | 5 +- 4 files changed, 108 insertions(+), 32 deletions(-) create mode 100644 spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/SizeThreshold.java diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index 54aba8bd89..96c50f2e7f 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -32,7 +32,6 @@ import javax.validation.constraints.NotNull; import io.undertow.Undertow.Builder; import io.undertow.UndertowOptions; - import org.apache.catalina.Context; import org.apache.catalina.connector.Connector; import org.apache.catalina.valves.AccessLogValve; @@ -655,10 +654,11 @@ public class ServerProperties /** * Get the max http header size. * @return the max http header size. - * @deprecated in favor of {@code server.maxHttpHeaderSize} + * @deprecated as of 1.4 in favor of + * {@link ServerProperties#getMaxHttpHeaderSize()} */ @Deprecated - @DeprecatedConfigurationProperty(replacement = "server.maxHttpHeaderSize") + @DeprecatedConfigurationProperty(replacement = "server.max-http-header-size") public int getMaxHttpHeaderSize() { return this.maxHttpHeaderSize; } @@ -666,7 +666,8 @@ public class ServerProperties /** * Set the max http header size. * @param maxHttpHeaderSize the max http header size. - * @deprecated in favor of {@code server.maxHttpHeaderSize} + * @deprecated as of 1.4 in favor of + * {@link ServerProperties#setMaxHttpHeaderSize(int)} */ @Deprecated public void setMaxHttpHeaderSize(int maxHttpHeaderSize) { @@ -754,11 +755,10 @@ public class ServerProperties if (this.minSpareThreads > 0) { customizeMinThreads(factory); } - if (serverProperties.getMaxHttpHeaderSize() > 0) { - customizeMaxHttpHeaderSize(factory, serverProperties.getMaxHttpHeaderSize()); - } - else if (this.maxHttpHeaderSize > 0) { - customizeMaxHttpHeaderSize(factory, this.maxHttpHeaderSize); + int maxHttpHeaderSize = (serverProperties.getMaxHttpHeaderSize() > 0 + ? serverProperties.getMaxHttpHeaderSize() : this.maxHttpHeaderSize); + if (maxHttpHeaderSize > 0) { + customizeMaxHttpHeaderSize(factory, maxHttpHeaderSize); } if (serverProperties.getMaxHttpPostSize() > 0) { customizeMaxHttpPostSize(factory, serverProperties.getMaxHttpPostSize()); @@ -841,7 +841,8 @@ public class ServerProperties @SuppressWarnings("rawtypes") private void customizeMaxHttpHeaderSize( - TomcatEmbeddedServletContainerFactory factory, final int maxHttpHeaderSize) { + TomcatEmbeddedServletContainerFactory factory, + final int maxHttpHeaderSize) { factory.addConnectorCustomizers(new TomcatConnectorCustomizer() { @Override @@ -857,12 +858,15 @@ public class ServerProperties } private void customizeMaxHttpPostSize( - TomcatEmbeddedServletContainerFactory factory, final int maxHttpPostSize) { + TomcatEmbeddedServletContainerFactory factory, + final int maxHttpPostSize) { factory.addConnectorCustomizers(new TomcatConnectorCustomizer() { + @Override public void customize(Connector connector) { connector.setMaxPostSize(maxHttpPostSize); } + }); } @@ -952,7 +956,8 @@ public class ServerProperties JettyEmbeddedServletContainerFactory factory) { factory.setUseForwardHeaders(serverProperties.getOrDeduceUseForwardHeaders()); if (serverProperties.getMaxHttpHeaderSize() > 0) { - customizeMaxHttpHeaderSize(factory, serverProperties.getMaxHttpHeaderSize()); + customizeMaxHttpHeaderSize(factory, + serverProperties.getMaxHttpHeaderSize()); } if (serverProperties.getMaxHttpPostSize() > 0) { customizeMaxHttpPostSize(factory, serverProperties.getMaxHttpPostSize()); @@ -960,23 +965,31 @@ public class ServerProperties } private void customizeMaxHttpHeaderSize( - JettyEmbeddedServletContainerFactory factory, final int maxHttpHeaderSize) { + JettyEmbeddedServletContainerFactory factory, + final int maxHttpHeaderSize) { factory.addServerCustomizers(new JettyServerCustomizer() { + @Override public void customize(Server server) { - org.eclipse.jetty.server.Connector[] connectors = server.getConnectors(); - for (org.eclipse.jetty.server.Connector connector : connectors) { - for (ConnectionFactory connectionFactory : connector.getConnectionFactories()) { + for (org.eclipse.jetty.server.Connector connector : server + .getConnectors()) { + for (ConnectionFactory connectionFactory : connector + .getConnectionFactories()) { if (connectionFactory instanceof HttpConfiguration.ConnectionFactory) { - HttpConfiguration httpConfig = - ((HttpConfiguration.ConnectionFactory) connectionFactory) - .getHttpConfiguration(); - httpConfig.setRequestHeaderSize(maxHttpHeaderSize); - httpConfig.setResponseHeaderSize(maxHttpHeaderSize); + customize( + (HttpConfiguration.ConnectionFactory) connectionFactory); } } } + } + + private void customize(HttpConfiguration.ConnectionFactory factory) { + HttpConfiguration configuration = factory.getHttpConfiguration(); + configuration.setRequestHeaderSize(maxHttpHeaderSize); + configuration.setResponseHeaderSize(maxHttpHeaderSize); + } + }); } @@ -993,7 +1006,8 @@ public class ServerProperties Handler... handlers) { for (Handler handler : handlers) { if (handler instanceof ContextHandler) { - ((ContextHandler) handler).setMaxFormContentSize(maxHttpPostSize); + ((ContextHandler) handler) + .setMaxFormContentSize(maxHttpPostSize); } else if (handler instanceof HandlerWrapper) { setHandlerMaxHttpPostSize(maxHttpPostSize, @@ -1112,7 +1126,8 @@ public class ServerProperties } factory.setUseForwardHeaders(serverProperties.getOrDeduceUseForwardHeaders()); if (serverProperties.getMaxHttpHeaderSize() > 0) { - customizeMaxHttpHeaderSize(factory, serverProperties.getMaxHttpHeaderSize()); + customizeMaxHttpHeaderSize(factory, + serverProperties.getMaxHttpHeaderSize()); } if (serverProperties.getMaxHttpPostSize() > 0) { customizeMaxHttpPostSize(factory, serverProperties.getMaxHttpPostSize()); @@ -1120,22 +1135,30 @@ public class ServerProperties } private void customizeMaxHttpHeaderSize( - UndertowEmbeddedServletContainerFactory factory, final int maxHttpHeaderSize) { + UndertowEmbeddedServletContainerFactory factory, + final int maxHttpHeaderSize) { factory.addBuilderCustomizers(new UndertowBuilderCustomizer() { + @Override public void customize(Builder builder) { - builder.setServerOption(UndertowOptions.MAX_HEADER_SIZE, maxHttpHeaderSize); + builder.setServerOption(UndertowOptions.MAX_HEADER_SIZE, + maxHttpHeaderSize); } + }); } private void customizeMaxHttpPostSize( - UndertowEmbeddedServletContainerFactory factory, final int maxHttpPostSize) { + UndertowEmbeddedServletContainerFactory factory, + final int maxHttpPostSize) { factory.addBuilderCustomizers(new UndertowBuilderCustomizer() { + @Override public void customize(Builder builder) { - builder.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, (long) maxHttpPostSize); + builder.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, + (long) maxHttpPostSize); } + }); } diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/SizeThreshold.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/SizeThreshold.java new file mode 100644 index 0000000000..c3e29128f8 --- /dev/null +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/SizeThreshold.java @@ -0,0 +1,52 @@ +/* + * Copyright 2012-2016 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.boot.autoconfigure.web; + +import org.springframework.util.Assert; + +/** + * A size threshold that can be specified in + * + * @author Phillip Webb + */ +class SizeThreshold { + + private long inBytes; + + private SizeThreshold(long inBytes) { + this.inBytes = inBytes; + } + + public long getInBytes() { + return this.inBytes; + } + + private static SizeThreshold parse(String size) { + Assert.hasLength(size, "Size must not be empty"); + size = size.toUpperCase(); + if (size.endsWith("KB")) { + return new SizeThreshold( + Long.valueOf(size.substring(0, size.length() - 2)) * 1024); + } + if (size.endsWith("MB")) { + return new SizeThreshold( + Long.valueOf(size.substring(0, size.length() - 2)) * 1024 * 1024); + } + return new SizeThreshold(Long.valueOf(size)); + } + +} diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java index c0d6ada93f..1676c20565 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java @@ -253,11 +253,11 @@ public class ServerPropertiesTests { } @Test - public void testCustomizeTomcatHeaderSize() throws Exception { + public void testCustomizeHeaderSize() throws Exception { Map map = new HashMap(); - map.put("server.tomcat.maxHttpHeaderSize", "9999"); + map.put("server.maxHttpHeaderSize", "9999"); bindProperties(map); - assertThat(this.properties.getTomcat().getMaxHttpHeaderSize()).isEqualTo(9999); + assertThat(this.properties.getMaxHttpHeaderSize()).isEqualTo(9999); } @Test diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 4510a04e60..9e755165a7 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -159,6 +159,8 @@ content into your application; rather pick only the properties that you need. server.context-parameters.*= # Servlet context init parameters. For instance `server.context-parameters.a=alpha` server.context-path= # Context path of the application. server.display-name=application # Display name of the application. + server.max-http-header-size=0 # Maximum size in bytes of the HTTP message header. + server.max-http-post-size=0 # Maximum size in bytes of the HTTP post content. server.error.include-stacktrace=never # When to include a "stacktrace" attribute. server.error.path=/error # Path of the error controller. server.error.whitelabel.enabled=true # Enable the default error page displayed in browsers in case of a server error. @@ -168,6 +170,7 @@ content into your application; rather pick only the properties that you need. server.port=8080 # Server HTTP port. server.server-header= # The value sent in the server response header (uses servlet container default if empty) server.servlet-path=/ # Path of the main dispatcher servlet. + server.use-forward-headers= # If X-Forwarded-* headers should be applied to the HttpRequest. server.session.cookie.comment= # Comment for the session cookie. server.session.cookie.domain= # Domain for the session cookie. server.session.cookie.http-only= # "HttpOnly" flag for the session cookie. @@ -207,7 +210,6 @@ content into your application; rather pick only the properties that you need. 172\\.1[6-9]{1}\\.\\d{1,3}\\.\\d{1,3}|\\ 172\\.2[0-9]{1}\\.\\d{1,3}\\.\\d{1,3}|\\ 172\\.3[0-1]{1}\\.\\d{1,3}\\.\\d{1,3} # regular expression matching trusted IP addresses. - server.tomcat.max-http-header-size=0 # Maximum size in bytes of the HTTP message header. server.tomcat.max-threads=0 # Maximum amount of worker threads. server.tomcat.min-spare-threads=0 # Minimum amount of worker threads. server.tomcat.port-header=X-Forwarded-Port # Name of the HTTP header used to override the original port value. @@ -223,7 +225,6 @@ content into your application; rather pick only the properties that you need. server.undertow.direct-buffers= # Allocate buffers outside the Java heap. server.undertow.io-threads= # Number of I/O threads to create for the worker. server.undertow.worker-threads= # Number of worker threads. - server.use-forward-headers= # If X-Forwarded-* headers should be applied to the HttpRequest. # FREEMARKER ({sc-spring-boot-autoconfigure}/freemarker/FreeMarkerAutoConfiguration.{sc-ext}[FreeMarkerAutoConfiguration]) spring.freemarker.allow-request-override=false # Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.