inat-ranges / kubernetes /set-bucket-cors.sh
cboettig's picture
kubectl files
0ad4f4d
raw
history blame contribute delete
496 Bytes
#! /bin/bash
# S3 Bucket requires CORS rules before we can easily stream from it on HTTPS
aws s3api --endpoint-url ${AWS_S3_ENDPOINT} put-bucket-cors --bucket public-data --cors-configuration '{
"CORSRules": [
{
"AllowedOrigins": ["*"],
"AllowedMethods": ["GET"],
"ExposeHeaders": ["ETag", "Content-Type", "Content-Disposition"],
"AllowedHeaders": ["*"]
}
]
}'
aws s3api --endpoint-url https://s3-west.nrp-nautilus.io get-bucket-cors --bucket public-data