Prevent Hotlinking
-
Hi
I want prevent hotlinking from amazon s3, i found lots of “policies” on Google, some worked for me just like this:
{
“Version”: “2008-10-17”,
“Id”: “httprefererpolicyexample”,
“Statement”: [
{
“Sid”: “Allowgetrequestsreferredbywww.xyz.com,
xyz.com”,
“Effect”: “Allow”,
“Principal”: “*”,
“Action”: “s3:GetObject”,
“Resource”: “arn:aws:s3:::imgbox/*”,
“Condition”: {
“StringLike”: {
“aws:Referer”: [
“https://domain.com/*”,
“https://www.domain.com/*”
]
}
}
}
]
}But this “policies” just can work when i set the files as “Private”, Amazon S3 and Cloudfront plugin will automatically set files as “public” . So i hope you can add a function to prevent hotlinking.
- The topic ‘Prevent Hotlinking’ is closed to new replies.