diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2021-09-25 12:13:04 +0200 |
---|---|---|
committer | Bastien Wirtz <bastien.wirtz@gmail.com> | 2021-09-25 12:19:32 +0200 |
commit | 7129af3bda3a7a7d506bd8c8f122ad8995c2906c (patch) | |
tree | 2928e83f60dc4a8a3cee637fa25a9a504e7ba25c | |
parent | 1d3287dcca801a000dbdb40ef20fd26a97ebb2e3 (diff) | |
download | homer-7129af3bda3a7a7d506bd8c8f122ad8995c2906c.tar.gz homer-7129af3bda3a7a7d506bd8c8f122ad8995c2906c.tar.zst homer-7129af3bda3a7a7d506bd8c8f122ad8995c2906c.zip |
Add troubleshooting section
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | docs/customservices.md | 2 | ||||
-rw-r--r-- | docs/troubleshooting.md | 19 |
3 files changed, 22 insertions, 1 deletions
@@ -47,7 +47,7 @@ | |||
47 | - [Custom services](docs/customservices.md) | 47 | - [Custom services](docs/customservices.md) |
48 | - [Tips & tricks](docs/tips-and-tricks.md) | 48 | - [Tips & tricks](docs/tips-and-tricks.md) |
49 | - [Development](docs/development.md) | 49 | - [Development](docs/development.md) |
50 | 50 | - [Troubleshooting](docs/troubleshooting.md) | |
51 | 51 | ||
52 | ## Features | 52 | ## Features |
53 | 53 | ||
diff --git a/docs/customservices.md b/docs/customservices.md index 83d5f3e..4a023a1 100644 --- a/docs/customservices.md +++ b/docs/customservices.md | |||
@@ -4,6 +4,8 @@ Some service can use a specific a component that provides some extra features by | |||
4 | configuration. Available services are in `src/components/`. Here is an overview of all custom services that are available | 4 | configuration. Available services are in `src/components/`. Here is an overview of all custom services that are available |
5 | within Homer. | 5 | within Homer. |
6 | 6 | ||
7 | If you experiencing any issue, please have a look to the [troubleshooting](troubleshooting.md) page. | ||
8 | |||
7 | ## PiHole | 9 | ## PiHole |
8 | 10 | ||
9 | Using the PiHole service you can display info about your local PiHole instance right on your Homer dashboard. | 11 | Using the PiHole service you can display info about your local PiHole instance right on your Homer dashboard. |
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md new file mode 100644 index 0000000..ed1f85d --- /dev/null +++ b/docs/troubleshooting.md | |||
@@ -0,0 +1,19 @@ | |||
1 | # Troubleshooting | ||
2 | |||
3 | ## My custom service card doesn't work, nothing appears or offline status is displayed (pi-hole, sonarr, ping, ...) | ||
4 | |||
5 | You might by facing a [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) (Cross Origin Request Sharing) issue. | ||
6 | It happens when the targeted service is hosted on a different domain or port. | ||
7 | Web browsers will not allow to fetch information from a different site without explicit permissions (the targeted service | ||
8 | must include a special `Access-Control-Allow-Origin: *` HTTP headers). | ||
9 | If this happens your web console (`ctrl+shit+i` or `F12`) will be filled with this kind of errors: | ||
10 | |||
11 | ```text | ||
12 | Access to fetch at 'https://<target-service>' from origin 'https://<homer>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. | ||
13 | ``` | ||
14 | |||
15 | To resolve this, you can either: | ||
16 | |||
17 | * Host all your target service under the same domain & port. | ||
18 | * Modify the target sever configuration so that the response of the server included following header- `Access-Control-Allow-Origin: *` (<https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests>). It might be an option in the targeted service, otherwise depending on how the service is hosted, the proxy or web server can seamlessly add it. | ||
19 | * Use a cors proxy sever like [`cors-container`](https://github.com/imjacobclark/cors-container), [`cors-anywhere`](https://github.com/Rob--W/cors-anywhere) or many others. | ||