I’m trying to prevent people from embedding my website in an iframe except for a specific URL, my primary domain.
I am hosting the entire front-end on an S3 bucket. Is this something that can be accomplished with the S3 Bucket Policy?
I’m trying to prevent people from embedding my website in an iframe except for a specific URL, my primary domain.
I am hosting the entire front-end on an S3 bucket. Is this something that can be accomplished with the S3 Bucket Policy?
2
Answers
You should be able to limit this by using the "aws:Referer" condition.
Taken from this page:
https://asecure.cloud/a/s3_http_referrer/
Its not really possible with proper authentication and authorization. AWS docs clearly says you shouldn’t relay on
aws:Referer
: