This is what I have in api.ts file import { MiddlewareConfigFn } from "wasp/server"; import { FooBar } from "wasp/server/api"; // This type is generated by Wasp based on the
export const fooBar: FooBar = (req, res, context) => { res.set("Access-Control-Allow-Origin", ""); // Example of modifying headers to override Wasp default CORS middleware. res.json({ msg:
}); // }; And in main.wasp api fooBar { fn: import { fooBar } from "@src/api", httpRoute: (GET, "/foo/bar"), auth: true, middlewareConfigFn: import { apiMiddleware } from "@src/api" } I get CORS when hitting it for some reason, as you can see I tried using it with auth,without auth with res.set("Access-Control-Allow-Origin", "*"); nothing seems to fix it, any ideas?