mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
fix: grpc client, allow insecure only in dev
This commit is contained in:
@@ -74,6 +74,9 @@ func NewClient(opts ...ClientOption) (client.Client, error) {
|
||||
}
|
||||
switch options.tlsMode {
|
||||
case "insecure":
|
||||
if os.Getenv("OCIS_INSECURE") != "true" {
|
||||
return nil, errors.New("insecure TLS mode is only allowed in development environments with OCIS_INSECURE=true")
|
||||
}
|
||||
tlsConfig = &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user