amenezes / config-client

config-client package for spring cloud config and cloud foundry
https://config-client.amenezes.net/
Apache License 2.0
24 stars 18 forks source link

Is there a option for https? #41

Closed higorcoliveira closed 3 years ago

higorcoliveira commented 3 years ago

I'm testing the client inside a application with Django. My config server does not allow traffic on 80, only 443. When I use this client, I got a error with https. Changed my config-server to allow traffic to http and configured the client to the same protocol, everything works fine.

Is there a option or plans for allowing https?

Thanks.

amenezes commented 3 years ago

Hello @higorcoliveira,

The certificate used by your config-server it's self-signed? Did you try use the option verify=False in the method get_config?

from config.spring import ConfigClient

c = ConfigClient(app_name='simpleweb000', address='https://localhost:2016', fail_fast=False)
c.get_config(verify=False)

For this example I used caddy with this command line:

./caddy_linux_amd64 reverse-proxy --from https://localhost:2016 --to 127.0.0.1:8888 --insecure

and the docker-compose present in the root directory of project.

Try this and let me know if the problem was resolved.

higorcoliveira commented 3 years ago

Hi @amenezes,

Indeed, the certificate is self-signed. The option verify solved my problem.

Thanks.