Next.js Discord

Discord Forum

RSC and cors

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
Hi all, I know we all love cors but how do we handle it with a RSC that is directly getting data. In my instance, I’m using the aws sdk to get s3 data so not an API fetch. However in Next RSC that’s triggering the access control checks error because it uses an api fetch in the sdk. Adding to the next config doesn’t seem to work unless I’m messing up the source portion. I’ve previously been told on here to use my fetch code directly in my RSC components instead of a separate next API so im not sure how this all pieces together.

0 Replies