WaspW
Wasp15mo ago
Sven

CORS issue on my custom API

I am getting this CORS error on an api call from my chrome extension to my custom wasp api.

Access to fetch at 'http://localhost:3001/api/authUserExtension' from origin 'chrome-extension://bopkjccjbddnmenbconjhiglhbbcniia' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.


main.wasp

api authUserExtension {
  fn: import { authUserExtension } from "@src/server/api/authUserExtension",
  entities: [User],
  httpRoute: (POST, "/api/authUserExtension")
}
Was this page helpful?