Introduce TLS Settings for go-micro based http services
TLS for the services can be configure by setting the "OCIS_HTTP_TLS_ENABLED", "OCIS_HTTP_TLS_CERTIFICATE" and "OCIS_HTTP_TLS_KEY" environment variables. Currently the ocis proxy is this only service that directly accesses backend services. It determines whether to use TLS or not by looking a the new registry metadata "use_tls". As specific CA Cert for certificate verification can be set with the "PROXY_HTTPS_CACERT" environment variable.
This commit is contained in:
committed by
Ralf Haferkamp
parent
cbe41fb85f
commit
b24d126b30
@@ -72,10 +72,13 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
|
||||
m.BuildInfo.WithLabelValues(version.GetString()).Set(1)
|
||||
|
||||
rp := proxy.NewMultiHostReverseProxy(
|
||||
rp, err := proxy.NewMultiHostReverseProxy(
|
||||
proxy.Logger(logger),
|
||||
proxy.Config(cfg),
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to initialize reverse proxy: %w", err)
|
||||
}
|
||||
|
||||
{
|
||||
server, err := proxyHTTP.Server(
|
||||
|
||||
Reference in New Issue
Block a user