Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:cables-gl/cables_docs into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
pandrr committed Nov 5, 2024
2 parents f618d64 + f8051c4 commit c60bb87
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions md/4_export_embed/cors/cors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## When does this happen?

Sometimes you want to access ressouces on different servers than your patch is running on, these may be
Sometimes you want to access resources on different servers than your patch is running on, these may be
images, some api or any different file. Check [this patch](https://cables.gl/p/5FQ08W) for example, that
loads data from an API to get the current temperature in Berlin.

Expand All @@ -11,9 +11,10 @@ certain HTTP-Headers (see below). Really often this is not the case.

## How do i know this happens to me?

use this cors test to see if your headers are set correctly: https://cors-test.codehappy.dev/
Use this cors test to see if your headers are set correctly: https://cors-test.codehappy.dev/

First of all, you won't see the files loaded, no images, no data from the API. Check your developer tools (ctrl+shift+i or cmd+option+i) console
First of all, you won't see the files loaded, no images, no data from the API. Errors like "unexpected end of JSON".
Check your developer tools (ctrl+shift+i or cmd+option+i) console
in the browser and you will, most likely, see something like this:

```
Expand Down Expand Up @@ -42,6 +43,7 @@ to adding this to your HTTP-Response headers:
```
Access-Control-Allow-Origin: https://cables.gl
Access-Control-Allow-Origin: https://sandbox.cables.gl
Access-Control-Allow-Origin: https://devsandbox.cables.gl
```

or more broadly:
Expand Down

0 comments on commit c60bb87

Please sign in to comment.