Basically we are getting a lot of CORS issues, such as:
Failed to load resource: the server responded with a status of 401 ()Origin https://wislearn.io is not allowed by Access-Control-Allow-Origin. Status code: 504XMLHttpRequest cannot load https://api.wislearn.io/operations/process-task due to access control checks.
Failed to load resource: the server responded with a status of 401 ()Origin https://wislearn.io is not allowed by Access-Control-Allow-Origin. Status code: 504XMLHttpRequest cannot load https://api.wislearn.io/operations/process-task due to access control checks.
`import cors from 'cors'import { config, type MiddlewareConfigFn } from 'wasp/server'export const serverMiddlewareFn: MiddlewareConfigFn = (middlewareConfig) => { // Set up CORS with allowed origins middlewareConfig.set('cors', cors({ origin: [config.frontendUrl, 'https://api.wislearn.io', 'https://wislearn.io'] })); return middlewareConfig;};
`import cors from 'cors'import { config, type MiddlewareConfigFn } from 'wasp/server'export const serverMiddlewareFn: MiddlewareConfigFn = (middlewareConfig) => { // Set up CORS with allowed origins middlewareConfig.set('cors', cors({ origin: [config.frontendUrl, 'https://api.wislearn.io', 'https://wislearn.io'] })); return middlewareConfig;};
Pretty much as the guides and other examples shows. Any idea what could be happening?
Best regards
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
W
Wasp
Rails-like framework for React, Node.js and Prisma. Build your app in a day and deploy it with a single CLI command.