district0x / district-registry

A community-curated registry of marketplaces on the district0x Network.
Eclipse Public License 1.0
11 stars 9 forks source link

Unable to submit new district to registry #115

Open grasponcrypto opened 3 years ago

grasponcrypto commented 3 years ago

There is an issue with image upload. Seems to be a CORS issue.

submit:1 Access to XMLHttpRequest at 'https://ipfs.district0x.io/api/api/v0/add?arg=' from origin 'https://registry.district0x.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
POST https://ipfs.district0x.io/api/api/v0/add?arg= net::ERR_FAILED
ERROR [district.ui.logging.events:39] - Uploading district bg image failed :district-registry.ui.events/add-district-bg-image {:status 0, :success false, :body "", :headers {}, :trace-redirects ["https://ipfs.district0x.io/api/api/v0/add?arg=" "https://ipfs.district0x.io/api/api/v0/add?arg="], :error-code :http-error, :error-text " [0]"}

i'm flying a bit blind here, but it sounds like ipfs.district0x.io/api server needs CORS Policy applied to allow calls from registry.district0x.io Thats just a guess.