7 months ago
Hello! I was playing around with the new storage buckets feature, and a CORS error stopped me from uploading a presigned post to the bucket.
Access to XMLHttpRequest at 'https://.storage.railway.app/' from origin 'https://' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
As far as I know, I'm not able to configure the CORS on my storage bucket right?
Pinned Solution
3 months ago
Update, they added a CORS section to their tutorial. Following this step fixed the issue for me:
AWS_ACCESS_KEY_ID=your_access_key_id \
AWS_SECRET_ACCESS_KEY=your_secret_access_key \
aws s3api put-bucket-cors \
--bucket your_bucket_name \
--endpoint-url https://storage.railway.app \
--cors-configuration '{
"CORSRules": [
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["*"],
"AllowedOrigins": ["*"],
"MaxAgeSeconds": 3000
}
]
}'
4 Replies
7 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
6 months ago
Same here.
3 months ago
Update, they added a CORS section to their tutorial. Following this step fixed the issue for me:
AWS_ACCESS_KEY_ID=your_access_key_id \
AWS_SECRET_ACCESS_KEY=your_secret_access_key \
aws s3api put-bucket-cors \
--bucket your_bucket_name \
--endpoint-url https://storage.railway.app \
--cors-configuration '{
"CORSRules": [
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["*"],
"AllowedOrigins": ["*"],
"MaxAgeSeconds": 3000
}
]
}'
Status changed to Solved brody • 3 months ago