Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
steam0r committed Oct 30, 2024
2 parents 4fc5344 + 8deaf78 commit f8051c4
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 f8051c4

Please sign in to comment.