Skip to content
Advertisement

How to disable Keep alive in SpringBoot application in docker image

We have a Web application with following technologies: Java, SpringBoot, Docker, Microservices, Jhipster. The port number for the frontend container is 80.

I am trying to disable keep alive option for the frontend microservice because SSO Authentication Server requires this parameter set to be false.

I tried to create the front container with maven : mvn -Pqpm,no-liquibase -Dhttp.keepAlive=false clean verify jib:dockerBuild

I also tried to disable in pom.xml of the front container :

JavaScript

But the keep-alive option remains enabled when I send a http request :

JavaScript

My Springboot config:

JavaScript

Could you please help me to disable it ?

Advertisement

Answer

I finally found a solution. The way we did this was to implement a filter and add this filter to SecurityConfig.config method.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement