]> git.immae.eu Git - github/bastienwirtz/homer.git/blob - docs/troubleshooting.md
doc(auth): add auth proxy documentation
[github/bastienwirtz/homer.git] / docs / troubleshooting.md
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+shift+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 server 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 server like [`cors-container`](https://github.com/imjacobclark/cors-container), [`cors-anywhere`](https://github.com/Rob--W/cors-anywhere) or many others.
20
21 ## I am using an authentication proxy and homer says I am offline
22
23 This should be a configuration issue.
24 * Make sure the option `connectivityCheck` is set to `true` in configuration.
25 * Check your proxy configuration, the expected behavior is to redirect user using a 302 to the login page when user is not authenticated.