AWS S3 Bucket Policy: Hotlink Protection by use Referer
date
May 16, 2023
slug
1684240059
status
Published
tags
片段
AWS S3
summary
AWS S3 Bucket Policy: Hotlink Protection by use Referer
type
Post
url
{ "Id": "Referer-Hot-Link-Protection", "Version": "2012-10-17", "Statement": [ { "Sid": "CXPLAY-ORG", "Action": [ "s3:GetObject", "s3:HeadObject" ], "Effect": "Allow", "Resource": "*", "Condition": { "StringLike": { "aws:Referer": "*.cxplay.org" }, "StringEquals": { "aws:Referer": "cxplay.org" } } }, { "Sid": "CX-MS", "Action": [ "s3:GetObject", "s3:HeadObject" ], "Effect": "Allow", "Resource": "*", "Condition": { "StringLike": { "aws:Referer": "*.cx.ms" }, "StringEquals": { "aws:Referer": "cx.ms" } } }, { "Sid": "REFERER-BLANK", "Action": [ "s3:GetObject", "s3:HeadObject" ], "Effect": "Allow", "Resource": "*", "Condition": { "Null": { "aws:Referer": "true" } } } ] }