From: SleeplessOne1917 Date: Thu, 22 Jun 2023 02:45:21 +0000 (+0000) Subject: Regenerate manifest on HTTPBase external change (#1459) X-Git-Url: http://these/git/%22%7Burl%7D/static/%24%7Bargs.thread.url%7D?a=commitdiff_plain;h=cda9bd0a795088aa69d4a5f7b96cc637f37644b9;p=lemmy-ui.git Regenerate manifest on HTTPBase external change (#1459) Co-authored-by: Dessalines --- diff --git a/src/server/handlers/manifest-handler.ts b/src/server/handlers/manifest-handler.ts index 55c7b64..6858cff 100644 --- a/src/server/handlers/manifest-handler.ts +++ b/src/server/handlers/manifest-handler.ts @@ -1,6 +1,6 @@ import type { Request, Response } from "express"; import { LemmyHttp } from "lemmy-js-client"; -import { getHttpBaseInternal } from "../../shared/env"; +import { getHttpBaseExternal, getHttpBaseInternal } from "../../shared/env"; import { wrapClient } from "../../shared/services/HttpService"; import generateManifestJson from "../utils/generate-manifest-json"; import { setForwardedHeaders } from "../utils/set-forwarded-headers"; @@ -9,7 +9,7 @@ let manifest: Awaited> | undefined = undefined; export default async (req: Request, res: Response) => { - if (!manifest) { + if (!manifest || manifest.start_url !== getHttpBaseExternal()) { const headers = setForwardedHeaders(req.headers); const client = wrapClient( new LemmyHttp(getHttpBaseInternal(), { fetchFunction: fetch, headers })