Back

[SOLVED] CORS error on React app

  • 0
  • Web
neno123_
1 Dec, 2023, 18:27

Hello, I added my Netlify url as my Hostname and i get this CORS error. I also removed the localhost from the hostname, but still have access when i start the app on localhost.

TL;DR
Solution: The user was experiencing a CORS error on their React app. It turned out that their .env file was not working on Netlify. They resolved the issue by fixing their .env file, and now it is working correctly. Another user pointed out that the app might be missing the project ID and suggested checking for any extra spaces before or after the hostname. As for the CORS error, the user mentioned that they added their Netlify URL as the hostname and still encountered the error, even after removing "localhost" from the hostname. Unfortunately, a solution for the CORS error was not mentioned in the thread.
neno123_
1 Dec, 2023, 18:40

here it is

neno123_
1 Dec, 2023, 19:02

how to fix this?

Drake
1 Dec, 2023, 19:14

are you sure there are no other spaces before or after the hostname?

Drake
1 Dec, 2023, 19:15

Also, I think your app is missing the project ID

Drake
1 Dec, 2023, 19:15
neno123_
1 Dec, 2023, 21:51

my .env wasn't working on netlify, now its fixed and working, thank you Steven <:appwriterocket:823996226894692403>

Drake
2 Dec, 2023, 00:11

[SOLVED] CORS error on React app

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more