Back

cors issue

  • 0
  • Web
namannn
6 Aug, 2024, 03:22

Hey! I just hosted my website on my domain, and i made a web platform with the domain set. However, when i try to do smth like reset password it says

Access to fetch at 'https://cloud.appwrite.io/v1/account/recovery' from origin 'https://www.proxilink.info' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://localhost' that is not equal to the supplied origin. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I dont know where the localhost hvalue is coming from, can you please help?

TL;DR
There seems to be a CORS issue with the developer's website. The error is due to a mismatch between the allowed origin and the actual origin. The solution involves ensuring that the correct domain is added as an allowed web platform and adjusting the CORS policy to include the correct origin.
Steven
6 Aug, 2024, 03:27

Did you add your domain as an allowed web platform?

namannn
6 Aug, 2024, 03:27

yep!

namannn
6 Aug, 2024, 03:28

i think it may be happening because i am sending it from my mobile app i am making on expo (whcih im running locally rn) and then it sends you to our website hosted on another domain to reset the password

namannn
6 Aug, 2024, 03:28

do you think that is why?

Steven
6 Aug, 2024, 03:41

So do you have that other domain added as a web platform? Can you share a screenshot?

namannn
6 Aug, 2024, 03:42

yep!

namannn
6 Aug, 2024, 03:42
namannn
6 Aug, 2024, 03:42

it says this on network

namannn
6 Aug, 2024, 03:43

and my project id and all is set

Steven
6 Aug, 2024, 03:44

You added proxilink.info, but your app is on www.proxilink.info

namannn
6 Aug, 2024, 03:45

that makes a difference?

namannn
6 Aug, 2024, 03:45

gotcha

namannn
6 Aug, 2024, 03:46

lets test

namannn
6 Aug, 2024, 03:46

oMG

namannn
6 Aug, 2024, 03:46

god bless you steven

namannn
6 Aug, 2024, 03:46

πŸ™

namannn
6 Aug, 2024, 03:47

thank you sir, appreciate the fast help 🫑

Steven
6 Aug, 2024, 03:48

Happy to help!

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