1

I'm experimenting a small project with spring config-server. The config repo is maintained by gitlab which is password protected. When I stand up the config server project I get the below warning, also the property from the gitlab repo is not being read.

Invalid cookie header: "Set-Cookie: experimentation_subject_id=ImJiYTI3NmEzLWJmMWsfdfsdefdfiMmJlLTBjMTM1Njk3Mzg1MiI%3D--7a607dacd6c529dba85t5yd8067da9e1298f6ed; domain=.example.com; path=/; expires=Mon, 18 Jun 2040 09:52:48 -0000; secure; HttpOnly". Invalid 'expires' attribute: Mon, 18 Jun 2040 09:52:48 -0000

config-server - application.properties

server.port=8888

spring.cloud.config.server.git.uri=https://gitlab.example.com/example/config-service.git
spring.cloud.config.server.git.username=*******
spring.cloud.config.server.git.password=*******
spring.cloud.config.server.git.skip-ssl-validation=true
spring.cloud.config.server.git.clone-on-start=true

People have raised the similar question, where the exception was thrown at different projects and the solution to few was to upgrade apache client http client version. But on checking the config-server that I'm using the apache http client is laready at 4.5.10 version.

Is there any other configuration missing here ? Please let me know your inputs. Thanks.

Rajesh2389
  • 349
  • 2
  • 15

1 Answers1

2

I had the same issue while we had no need for cookies at all (stateless client). I don't know if that is the case on your end but then you can disable the cookie management of the ApacheHttpClient used by Spring. The disableCookieManagment() fixed this error on our end.

@Bean
public ApacheHttpClient httpclient() {
    return new ApacheHttpClient(
            org.apache.http.impl.client.HttpClientBuilder
                    .create()
                    .disableCookieManagement()
                    .disableConnectionState()
                    .build());
}