diff --git a/provider/unit-azure/unit-aks/src/main/java/org/opengroup/osdu/unitservice/UnitAksConfiguration.java b/provider/unit-azure/unit-aks/src/main/java/org/opengroup/osdu/unitservice/UnitAksConfiguration.java index 663d12610d188fad3364437ab4552b2641946f8c..6fbd7f400ecea9d90640e3f4baeb4bec14a9708e 100644 --- a/provider/unit-azure/unit-aks/src/main/java/org/opengroup/osdu/unitservice/UnitAksConfiguration.java +++ b/provider/unit-azure/unit-aks/src/main/java/org/opengroup/osdu/unitservice/UnitAksConfiguration.java @@ -1,7 +1,10 @@ package org.opengroup.osdu.unitservice; +import org.apache.tomcat.util.buf.EncodedSolidusHandling; import org.opengroup.osdu.unitservice.model.CatalogImpl; import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; +import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; @@ -25,4 +28,10 @@ public class UnitAksConfiguration { return CatalogImpl.createCatalog(reader); } } + + @Bean + public WebServerFactoryCustomizer<TomcatServletWebServerFactory> tomcatCustomizer() { + logger.info("Configuring Tomcat to allow encoded slashes."); + return factory -> factory.addConnectorCustomizers(connector -> connector.setEncodedSolidusHandling(EncodedSolidusHandling.DECODE.getValue())); + } }