im getting a cors error in the browser console. the api is for fetching blog posts. Access to fetch at 'http://localhost:3001/posts' from origin 'http://localhost:3000' 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.Understand this error service-worker.js:22 Uncaught (in promise) TypeError: Failed to fetch at service-worker.js:22:32Understand this error Access to fetch at 'http://localhost:3001/posts' from origin 'http://localhost:3000' 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.Understand this error service-worker.js:22 Uncaught (in promise) TypeError: Failed to fetch at service-worker.js:22:32Understand this error hook.js:608 Failed to load posts: AxiosError overrideMethod @ hook.js:608Understand this error :3001/posts:1 Failed to load resource: net::ERR_FAILED
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.