S3 CORS + Vercel Image
Answered
Blue-winged Warbler posted this in #help-forum
Blue-winged WarblerOP
Hey guys I'm being having a hard time lately with unintended CORS as I'm getting every policy on bucket right but my calls with <Image> are being denied constantly..
Is there some headers/fetch/or config I have to set there more than the s3 url on NextJS.config?
Thanks in advance π
Is there some headers/fetch/or config I have to set there more than the s3 url on NextJS.config?
Thanks in advance π
Answered by B33fb0n3
s3 shouldn't be used to serve files. Use a cdn instead. Some example for cdns are r2, bunny cdn, cloudflare or if you want to stay at AWS you can use cloudfront
3 Replies
@Blue-winged Warbler Hey guys I'm being having a hard time lately with unintended CORS as I'm getting every policy on bucket right but my calls with <Image> are being denied constantly..
Is there some headers/fetch/or config I have to set there more than the s3 url on NextJS.config?
Thanks in advance π
s3 shouldn't be used to serve files. Use a cdn instead. Some example for cdns are r2, bunny cdn, cloudflare or if you want to stay at AWS you can use cloudfront
Answer
@Blue-winged Warbler solved?
Blue-winged WarblerOP
Sorry to read this so late! Yes I did solved it