diff --git a/README.md b/README.md index 4fe6026..48c8b01 100644 --- a/README.md +++ b/README.md @@ -253,14 +253,6 @@ You can customise the responses that IPP sends for invalid requests. For example See [Custom responses](docs/custom-responses.md) for more details. -### Serving from multiple domains - -If you're serving the same IPP from multiple domains, instead of setting the public URL in your docker-compose file, you can set it dynamically via a HTTP header in the request from your reverse proxy to IPP. - -1. Remove the `PUBLIC_BASE_URL` environment variable from your docker-compose file. - -2. Set a custom `publicBaseUrl` header on each request with the value of your public base URL (example `https://your-proxy-url.com`). - ## Troubleshooting ### Video playback diff --git a/app/src/render.ts b/app/src/render.ts index c4173fb..b344660 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -144,8 +144,8 @@ class Render { */ async gallery (res: Response, share: SharedLink, openItem?: number) { // publicBaseUrl is used for the og:image, which requires a fully qualified URL. - // You can specify this in your docker-compose file, or send it dynamically as a `publicBaseUrl` header - const publicBaseUrl = process.env.PUBLIC_BASE_URL || res.req.headers.publicBaseUrl || (res.req.protocol + '://' + res.req.headers.host) + // You can specify this in your docker-compose file via the PUBLIC_BASE_URL env var. + const publicBaseUrl = process.env.PUBLIC_BASE_URL || (res.req.protocol + '://' + res.req.headers.host) // Date grouping needs chronological order; sort newest-first when enabled // (overrides any album.order the upstream applied).