mirror of
https://github.com/quay/quay.git
synced 2026-01-26 06:21:37 +03:00
storage: handle cn-north-1 region (PROJQUAY-3082) (#1129)
Handle S3 cn-north-1's endpoint, which has a com.cn TLD.
This commit is contained in:
committed by
GitHub
parent
fd190ad984
commit
ca17eb4312
@@ -744,6 +744,9 @@ class S3Storage(_CloudStorage):
|
||||
connect_kwargs["endpoint_url"] = "https://s3.{region}.amazonaws.com".format(
|
||||
region=s3_region
|
||||
)
|
||||
# cn-north-1's endpoint has a .com.cn TLD
|
||||
if s3_region == "cn-north-1":
|
||||
connect_kwargs["endpoint_url"] = connect_kwargs["endpoint_url"] + ".cn"
|
||||
elif host or endpoint_url:
|
||||
connect_kwargs["endpoint_url"] = endpoint_url or _build_endpoint_url(
|
||||
host, port=port, is_secure=True
|
||||
|
||||
Reference in New Issue
Block a user