Enable server.forward-headers-strategy by default and move to application.properties

This commit is contained in:
Tim Donohue
2021-05-13 14:27:18 -05:00
parent 3c1b90d603
commit d6b66dbaaa
2 changed files with 15 additions and 10 deletions

View File

@@ -77,6 +77,18 @@ spring.http.encoding.force=true
# However, you may wish to set this to "always" in your 'local.cfg' for development or debugging purposes.
server.error.include-stacktrace = never
# Spring Boot proxy configuration (can be overridden in local.cfg).
# By default, Spring Boot does not automatically use X-Forwarded-* Headers when generating links (and similar) in the
# DSpace REST API. Three options are currently supported by Spring Boot:
# * NATIVE = allows your web server to natively support standard Forwarded headers
# * FRAMEWORK = (DSpace default) enables Spring Framework's built in filter to manage these headers in Spring Boot.
# This setting is used by default to support all X-Forwarded-* headers, as the DSpace backend is often
# installed behind Apache HTTPD or Nginx proxy (both of which pass those headers to Tomcat).
# * NONE = (Spring default) Forwarded headers are ignored
# For more information see
# https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto-use-behind-a-proxy-server
server.forward-headers-strategy=FRAMEWORK
######################
# Spring Boot Autoconfigure
#
@@ -107,6 +119,9 @@ spring.main.allow-bean-definition-overriding = true
# Log4J configuration
logging.config = ${dspace.dir}/config/log4j2.xml
##################################
# Spring MVC file upload settings
#
# Maximum size of a single uploaded file (default = 1MB)
spring.servlet.multipart.max-file-size = 512MB

View File

@@ -371,16 +371,6 @@ useProxies = true
# (Requires reboot of servlet container, e.g. Tomcat, to reload)
#proxies.trusted.include_ui_ip = true
# Spring Boot proxy configuration (can be set in local.cfg or in application.properties).
# By default, Spring Boot does not automatically use X-Forwarded-* Headers when generating links (and similar) in the
# REST API. When using a proxy in front of the REST API, you may need to modify this setting:
# * NATIVE = allows your web server to natively support standard Forwarded headers
# * FRAMEWORK = enables Spring Framework's built in filter to manage these headers in Spring Boot
# * NONE = default value. Forwarded headers are ignored
# For more information see
# https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto-use-behind-a-proxy-server
#server.forward-headers-strategy=FRAMEWORK
#### Media Filter / Format Filter plugins (through PluginService) ####
# Media/Format Filters help to full-text index content or
# perform automated format conversions