Преглед изворни кода

Use SSL setting based on url protocol

Simon Detheridge пре 7 година
родитељ
комит
6f326d5650
1 измењених фајлова са 2 додато и 1 уклоњено
  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