CORS (next.js, firebase emulators)


I’m trying to access a cloud function that is running on Firebase Emulators from a Next.js app. Both are running in the same IDX workspace.

When I make the request to:


I receive a CORS error in the console for that URL:

The complete error looks like this:

Access to fetch at '
(redirected from ‘5001-monospace-bnr-tickets/…/us-central1/funcTest’) from origin ‘3000-monospace-bnr-tickets…’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: Redirect is not allowed for a preflight request.

It used to work before! Does anyone know what changed in IDX, and how I can fix this issue?

1 Like