2
2
3
3
## When does this happen?
4
4
5
- Sometimes you want to access ressouces on different servers than your patch is running on, these may be
5
+ Sometimes you want to access resources on different servers than your patch is running on, these may be
6
6
images, some api or any different file. Check [ this patch] ( https://cables.gl/p/5FQ08W ) for example, that
7
7
loads data from an API to get the current temperature in Berlin.
8
8
@@ -11,9 +11,10 @@ certain HTTP-Headers (see below). Really often this is not the case.
11
11
12
12
## How do i know this happens to me?
13
13
14
- use this cors test to see if your headers are set correctly: https://cors-test.codehappy.dev/
14
+ Use this cors test to see if your headers are set correctly: https://cors-test.codehappy.dev/
15
15
16
- 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
16
+ First of all, you won't see the files loaded, no images, no data from the API. Errors like "unexpected end of JSON".
17
+ Check your developer tools (ctrl+shift+i or cmd+option+i) console
17
18
in the browser and you will, most likely, see something like this:
18
19
19
20
```
@@ -42,6 +43,7 @@ to adding this to your HTTP-Response headers:
42
43
```
43
44
Access-Control-Allow-Origin: https://cables.gl
44
45
Access-Control-Allow-Origin: https://sandbox.cables.gl
46
+ Access-Control-Allow-Origin: https://devsandbox.cables.gl
45
47
```
46
48
47
49
or more broadly:
0 commit comments