diff --git a/core/registrar/backend.py b/core/registrar/backend.py index d48e64d2e8c13718a7d5af528aab7012cbdab856..10fd87826e479637a4c6fb4d982bb63d79012f3f 100644 --- a/core/registrar/backend.py +++ b/core/registrar/backend.py @@ -61,9 +61,15 @@ class EOxServerBackend(Backend): 'SECRET_ACCESS_KEY': source.secret_access_key, }) + endpoint_url = source.endpoint_url + if endpoint_url.startswith('https://'): + endpoint_url = endpoint_url[len('https://'):] + elif endpoint_url.startswith('http://'): + endpoint_url = endpoint_url[len('http://'):] + storage_auth, created_storage_auth = backends.StorageAuth.objects.get_or_create( - name=source.endpoint_url, - url=source.endpoint_url, + name=endpoint_url, + url=endpoint_url, storage_auth_type='S3', auth_parameters=params, )