Explorar o código

Use SSL setting based on url protocol

Simon Detheridge %!s(int64=7) %!d(string=hai) anos
pai
achega
6f326d5650
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      services/filestore/app/coffee/S3PersistorManager.coffee

+ 2 - 1
services/filestore/app/coffee/S3PersistorManager.coffee

@@ -43,8 +43,9 @@ getS3Options = (credentials) ->
 			secretAccessKey: credentials.auth_secret
 
 	if settings.filestore.s3.endpoint
+		endpoint = URL.parse(settings.filestore.s3.endpoint)
 		options.endpoint = settings.filestore.s3.endpoint
-		options.sslEnabled = false
+		options.sslEnabled = endpoint.protocol == 'https'
 
 	return options