Next.js Discord

Discord Forum

S3 CORS + Vercel Image

Answered
Blue-winged Warbler posted this in #help-forum
Open in Discord
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 πŸ™
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
View full answer

3 Replies

Answer
@Blue-winged Warbler solved?
Blue-winged WarblerOP
Sorry to read this so late! Yes I did solved it