diff --git a/src/main/kotlin/com/swm_standard/phote/common/tomcat/TomcatWebCustomConfig.kt b/src/main/kotlin/com/swm_standard/phote/common/tomcat/TomcatWebCustomConfig.kt new file mode 100644 index 0000000..9a3e43f --- /dev/null +++ b/src/main/kotlin/com/swm_standard/phote/common/tomcat/TomcatWebCustomConfig.kt @@ -0,0 +1,20 @@ +package com.swm_standard.phote.common.tomcat + +import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer +import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory +import org.springframework.boot.web.server.WebServerFactoryCustomizer +import org.springframework.context.annotation.Configuration + +@Configuration +class TomcatWebCustomConfig : WebServerFactoryCustomizer { + override fun customize(factory: TomcatServletWebServerFactory) { + factory.addConnectorCustomizers( + TomcatConnectorCustomizer { connector -> + connector.setProperty( + "relaxedQueryChars", + "<>[\\]^`{|}", + ) + }, + ) + } +}