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:
+2
-2
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user