mirror of
https://github.com/versity/versitygw.git
synced 2026-10-22 14:22:40 +00:00
The api layer validates a client's LocationConstraint against the gateway region, but the bucket is created in the s3 backend's own region (--region / VGW_S3_REGION). They are separate settings, so passing the validated client constraint through to the backend only worked when the two regions matched. With the gateway on the default us-east-1 and the backend on eu-west-1 the client sends no constraint at all, and the backend still answered IllegalLocationConstraintException: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to. which is the error in #2490. Set the constraint in S3Proxy.CreateBucket from the backend client's region instead, next to the existing empty-configuration drop. A backend on us-east-1 still gets no constraint, and the api layer's rejection of a client constraint that disagrees with the gateway region is unchanged. Fixes #2490