Back

CORS issue with custom domain

  • 0
  • Web
jgentes
20 Feb, 2024, 01:01

I'm seeing this response: { "message": "Invalid success param: URL host must be one of: localhost, appwrite.mixpoint.dev, appwrite.io, *.mixpoint.dev", "code": 400, "type": "general_argument_invalid", "version": "0.12.90" } and in my app settings: (screenshot)

Any ideas?

TL;DR
Developers are facing a CORS issue with a custom domain. They are using Cloudflare to manage DNS and hosting the app in a public repository. The issue is related to an invalid `success` parameter in the code. The correct approach is to add a platform that matches exactly instead of using wildcard.
Steven
20 Feb, 2024, 01:02

Add a platform that matches exactly (not using wildcard)

jgentes
20 Feb, 2024, 01:02

I should inclue this

jgentes
20 Feb, 2024, 01:03

it's web

jgentes
20 Feb, 2024, 01:04

btw, all works great locally

jgentes
20 Feb, 2024, 01:06

if I add an exact match, it doesn't fix the issue

Steven
20 Feb, 2024, 01:06

What did you put?

jgentes
20 Feb, 2024, 01:06

mixpoint.dev

jgentes
20 Feb, 2024, 01:06

should i put appwrite.mixpoint.dev?

Steven
20 Feb, 2024, 01:06

What's your code?

jgentes
20 Feb, 2024, 01:06

then what's the point of wildcard

jgentes
20 Feb, 2024, 01:07

gimme a sec

jgentes
20 Feb, 2024, 01:08

it's public

Steven
20 Feb, 2024, 01:09
Steven
20 Feb, 2024, 01:10

Is this where your app is hosted?

jgentes
20 Feb, 2024, 01:11

The dns is managed by cloudflare, but i can make adjustments if needed

Steven
20 Feb, 2024, 01:11

Make sure there aren't any extra spaces in what you put for the platform

jgentes
20 Feb, 2024, 01:12

this is the simplest app ever, so i'm a bit surpised there's any odidities

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