diff --git a/README.md b/README.md index af9227b..53f9422 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,9 @@ Setup takes less than a minute, and you never need to touch it again as all of y - [How to use it](#how-to-use-it) - [How it works](#how-it-works) - [Additional configuration](#additional-configuration) + - [IPP options](#immich-public-proxy-options) + - [lightGallery](#lightgallery) + - [Custom error pages](#customising-your-error-response-pages) - [Troubleshooting](#troubleshooting) - [Feature requests](#feature-requests) @@ -180,6 +183,10 @@ For example, to disable the download button for images, you would edit the `ligh } ``` +### Customising your error response pages + +See [Custom repsonses](docs/custom-responses.md). + ## Troubleshooting If you're using Cloudflare and having issues with videos not playing well, make sure your `/share/video/` paths are set to bypass cache. diff --git a/docs/custom-responses.md b/docs/custom-responses.md new file mode 100644 index 0000000..1000ec8 --- /dev/null +++ b/docs/custom-responses.md @@ -0,0 +1,34 @@ +# Customising your web responses + +To avoid giving information away about your server, IPP responds with a limited set of HTTP status codes: + +| Code | Reason | +|------|-------------------------------------------------------------------------------------------------| +| 503 | Healthcheck failed - Immich is not accessible. | +| 401 | Invalid password provided for a password-protected share link. | +| 404 | All other invalid requests, e.g. album doesn't exist, share link is expired, non-existing file. | + +Instead of sending these codes, you can customise the response(s) using your reverse proxy. + +## Caddy + +``` +https://ipp.example.com { + reverse_proxy 192.168.1.1:3000 { + @404 status 404 + handle_response @404 { + respond "This would be a custom response" + } + } +} +``` + +## Apache + +``` + + ProxyErrorOverride On 404 + ErrorDocument 404 /custom_404.html + Alias /custom_404.html /var/www/html/error-pages/404.html + +```