I'm facing cors issues when I make requests with my frontend delployed on vercel. I added and pointed it to a subdomain (distributa.ablestate.africa) of my domain (ablestate.africa).
In the platforms I have one that has its hostname as distributa.ablestata.africa so I should expect it to work. However requests keep on raising the cors issue.
I have attached screenshots of my response and configurations in the appwrite console. Any help is highly appreciated. Thanks.
#[SOLVED] Cors
24 messages · Page 1 of 1 (latest)
without seeing your settings....looks like you've only got localhost set up in your custom domains
sorry not custom domains but web platform integrations
Check your hostname settings
From your Project Overview page - scroll down to Integration and select your Web platform and edit the hostname settings from there
If you can see the second screenshot, production is one of the platforms which has its hostname set to distributa.ablestate.africa
I guess that should be working.
However I cannot tell why its actually not working?
I think, I have same issue, i have in Web platform > Hostname set my domain name atuk.cz. But chrome cors error, is still saying, "header has value 'HTTPS://localhost'"
add localhost too, or use * for testing.
No, It works, when I'm on localhost server of my website. But when I'm on atuk.cz/.... CORS blocks the request
I don't know much about this. But I think that appwrite has still set hostname to "localhost"
And how could I add localhost too?
Ok, sorry for interupting. I just had * before and after hostname, and that was messing things up, so it works now, thank for support, And sorry for maybe interupting this thread.
Nothing seems to be working my side. The issue persists even when I put an asterisk as the value for the hostname.
I really need to push this thing to production. I just can't find the reason why it is failing
Please correct me if I'm doing it wrong here
I expect it to allow all requests from vercel and all requests from distributa.ablestate.africa keeps popping that error on all requests.
Any help is welcome
It has worked. I had to redeploy with my vercel
Looks like the domain is not matching?
You had set it to distributa.ablestate.africa, but the website where you're trying it has the domain distributa-tau.vercel.app
Oh, I see, it happened too in the other app
Can i mark this as solved then?
Yes