-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
CORS issue since v2 #1952
Comments
Nothing has changed on the CORS end of things and we are running the same codebase in production. Is it possible you have something else sending different headers? |
I do have the same issue and was wondering because I didn't change anything. What I saw then, is that I get an error 503 which results in this CORS message (in firefox). Maybe have a look if that is happening with your setup, too. That cors message may be confusing. In general umami keeps crashing as soon as a request is sent from a website.
I run this on a koyeb instance. This keeps happening with new and old migrated mysql databases. Maybe have a look in your logs, to see if something similar is happening. |
I am experiencing the same in my instance. It worked fine before migration. Service is running as it should, and Umami is reporting no errors in the cli. |
I had to upgrade the machine to micro, after that it's working fine. Running not from docker but directly from the repo showed a nextjs error saying it needs more RAM. |
Okay for me, the error was that I was still on Node version 14. After the Update to Node 16 everything works again. |
I had the same issue described in this bug and, like @marc-on-github, upgrading from Node version 14 to 16 allowed everything to work correctly without CORS issues. My deploy and issue was on Vercel. Maybe the minimum Node version requirements differ on different platform deployed? |
Nope, on a Debian Buster system it also requires a more recent Node version than 14. I'm using NodeJS 18 LTS and it works. |
Hello everyone, I request from my front-end on localhost:3000 to umami on localhost:8080 The request works fine in Postman. fetch("http://localhost:8080/api/auth/login", {
method: "POST",
headers: {
"Content-Type": "application/json",
'Accept': '*/*',
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*",
},
body: JSON.stringify(formState),
}) |
same here, i'm using v2 with node v18. now cors has issued. |
Access to fetch at 'https://analytics.xx.com/api/send' from origin 'https://xx.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
The text was updated successfully, but these errors were encountered: