EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 02fc7e64 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Fixing S3 endpoint URL in GDAL friendly format

parent a19754e6
No related branches found
No related tags found
2 merge requests!36Staging to master to prepare 1.0.0 release,!32Registrar modularization
......@@ -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,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment