amazon s3

使用技巧





防盗链方法



在 Bucket policy 设置中设置

说明:
arn:aws:s3:::img.yeniugo.com/* 中的 img.yeniugo.combucket 名称

aws:Referer 里面的值为支持的网址

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Allow get requests originating from www.example.com and example.com.",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::img.yeniugo.com/*",
"Condition": {
"StringLike": {
"aws:Referer": [
"https://*.yeniugo.com/*",
"https://yeniugo.com/*"
]
}
}
}
]
}


cors设置

<CORSConfiguration>
<CORSRule>
<AllowedOrigin>http://*.yeniugo.com</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>

评论

  1. Sports Betting at Safest Betting Sites in Israel - Airjordan10 RetroOutlet
    Safest Betting Sites in how can i buy air jordan 18 stockx Israel · air jordan 18 stockx to good site The Best and Best Betting air jordan 18 retro red suede shipping Sites in the UK · The UK's Hottest Bookmakers · Betfair Sports Betting Authority · where to buy air jordan 18 retro yellow suede Betfair air jordan 18 retro red good website

    回复删除

发表评论

此博客中的热门博文

certbot cloudflare申请通用域名证书