-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: CORS issue #10241
Comments
Can you please add reproducible steps? The reproduction repo is our examples repository and not very helpful. |
@meenal9, when we had this issue, adding the correct localhost url to medusa-config.ts resolved it
Postman sends it "server-side" which means that cors doesn't have to pass, whereas in the browser you always will have cors. |
I have a vendor dashboard running on port 3000. Initially, the Medusa storefront also wasn't working due to a similar issue, but I managed to resolve it by making some modifications in the middleware. However, the vendor dashboard on port 3000 is still not working. I’ve updated both the medusa-config and the middleware, but I’m still encountering a CORS issue with a 204 error code. |
I'm experiencing the same issue. Have you found any solution yet? |
@meenal9 & @khaledxyz Make sure that you define AUTH_CORS correctly so that all applications requiring authentication (whether for admin users or customers) are included in the definition. My store application runs on port 3000, and my Medusa server runs on port 9000. Here are my CORS settings:
|
Package.json file
Node.js version
v22.11.0
Database and its version
PostgresSQL 17.0.1
Operating system name and version
Window
Browser name
Chrome
What happended?
CORS issue. I have seen couple of tickets in forum reporting the same issue. but no answers.
I have set everything as per the doc on main website. Also, it seems that doc is according to previous version of medusa.
Expected behavior
The API route should work
http://localhost:9000/auth/vendor/emailpass/register
Actual behavior
Its running fine in postman, and running good at backend, but when running it on frontend - http://localhost:8000/us
its showing CORS error
Link to reproduction repo
https://github.com/medusajs/examples
The text was updated successfully, but these errors were encountered: