Skip to content
Snippets Groups Projects
Commit dbe66d8a authored by Devin Kelley's avatar Devin Kelley
Browse files

Merge branch 'azure-fix-enc-slash' into 'master'

fix the AKS issue related to the encoded slash(%2F) into the URL

See merge request !392
parents 7fda1049 edf9d822
No related branches found
No related tags found
1 merge request!392fix the AKS issue related to the encoded slash(%2F) into the URL
Pipeline #293626 failed
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()));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment