3 Answers
- Newest
- Most votes
- Most comments
1
Hi,
One way could be to look for CloudFront signed urls or cookies to fetch the images: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html
Hope it helps ;)
1
How about bypassing CloudFront/CORS and used s3 presigned URLs?
Thanks for advise, but i don't really want to expose the S3, and it seems obvious to make it work with Cloud Front only... it's a public file anyway... signing urls kind of brings it's own complexity which nobody really wants to maintain
0
Figured it out. Was nothing to do with AWS. Simple CORS workaround as "cors" for Node , but "rewrites" in next.config.ts helped to just make request to my server instead of external domain. Thanks to all the help anyway
answered a year ago
Relevant content
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
Thank you for the help! It seems ok, but still i am wondering why can't the file that is already meant to be public have the publicity for fetch as well... it feels like unnecessary operation for hundreds of not logged in users without any subscription. Feels not right