Enable support for TLS
Closes: #90 (closed)
Testing:
-
Create a self signed certificate for
localhostand place the certificate and key in/tmp/server.crtand/tmp/server.key. -
Create a config file
config/gitlab-exporter.ymlwith following contentsserver: name: webrick listen_address: localhost listen_port: 8443 tls_enabled: true tls_cert_path: /tmp/server.crt tls_key_path: /tmp/server.key -
Run
bin/gitlab-exporter web -c config/gitlab-exporter.ymland see that WEBRick is started without errors. -
Confirm that gitlab-exporter loads all intermediate certificates using
openssl s_client -showcerts -connect localhost:8443 < /dev/null -
Try
curl http://localhost:8443and see that gitlab-exporter doesn't support connecting over HTTP
Edited by Balasankar 'Balu' C