Fix #234 remove non-functional publicBaseUrl variable

This should presumably not impact anyone. As mentioned in #234, Node lowercases incoming header keys, so the camelCase lookup `req.headers.publicBaseUrl` never matched any request. The header override has been dead code since it was added — operators relying on it would have silently been falling back to the Host header.

If we add it back in, will need to do it in a way that solves for cache-poisoning.
This commit is contained in:
Alan Grainger
2026-05-28 07:30:23 +08:00
parent bb2f1370c7
commit 79346d9bc7
2 changed files with 2 additions and 10 deletions
-8
View File
@@ -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. 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 ## Troubleshooting
### Video playback ### Video playback
+2 -2
View File
@@ -144,8 +144,8 @@ class Render {
*/ */
async gallery (res: Response, share: SharedLink, openItem?: number) { async gallery (res: Response, share: SharedLink, openItem?: number) {
// publicBaseUrl is used for the og:image, which requires a fully qualified URL. // 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 // 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.headers.publicBaseUrl || (res.req.protocol + '://' + res.req.headers.host) const publicBaseUrl = process.env.PUBLIC_BASE_URL || (res.req.protocol + '://' + res.req.headers.host)
// Date grouping needs chronological order; sort newest-first when enabled // Date grouping needs chronological order; sort newest-first when enabled
// (overrides any album.order the upstream applied). // (overrides any album.order the upstream applied).