s3cmd中有没有命令http://s3tools.org/通过它我可以设置cors(跨源资源共享)
我检查了这些网站。
http://www.bucketexplorer.com/documentation/amazon-s3--manage-cross-origin-resource-sharing.html
http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
有什么命令可以设置cors规则吗?
谢谢
最佳答案
对于您选择的工具,它看起来像 the S3cmd usage documentation有这个命令:
s3cmd setcors FILE s3://BUCKET
否则:
AWS put-bucket-cors Documentation 可能是您要找的东西?
使用
aws s3api put-bucket-cors --generate-cli-skeleton >cors.json
创建一个json输入文件,编辑后,你可以使用:
aws s3api put-bucket-cors --bucket [bucket name] --cors-configuration file://cors.json
覆盖存储桶现有的 cors 配置。
我只使用 cors.json 根 {} 中的“CORSRules”节,因为其他一切都由 cli 处理。
关于linux - 是否有通过 s3cmd 工具设置 cors(跨源资源共享)的选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31318482/