CORS issues when connecting to Speckle

Originally sent in General discussion
mysterybear

Hey, is the speckle.xyz server playing up or undergoing some changes or something? Been getting a bit of this (seems to resolve but happened twice briefly in the last 10 min)

iainsproat

Hi @mysterybear - thanks for reporting this. To try and better debug this issue, may I ask what browser or application are you using when you experience this? Which page or pages (urls) on speckle.xyz are you visiting?

mysterybear

Hi @iainsproat sorry for late reply on this, we basically have an application that calls Speckle like so https://github.com/theopensystemslab/buildx-reloaded/blob/00758fd5231c03a6e03add4a05706c5fd749d9f9/server/data/speckleModel.ts#L41-L64

and yeah it seems that intermittently the speckle.xyz server moans about CORS stuff

the obvious solution would be for us to self-host our own instance but yeahhh lol

being able to just use speckle.xyz is awful convenient :smiley:

I’m wondering if it’s a spam control thing? I’m developing this application so I’m probably hitting speckle.xyz quite hard every time I clear our IndexedDB cache of models

Hi @mysterybear

If it was spam control, you should receive a response with a 429 HTTP status code from Speckle Server.

If you are able to inspect the headers of the response (in Google Chrome, this is found in the Network tab of the developer tools panel) you should see an access-control-allow-origin header with a value of *.

Iain