X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fclient-html.ts;h=7d1d19588881d0f0a2a0ec767aa14dcea1777d6d;hb=6bff8ce23ac9a2de8c6ddcea9df5f7bd2b653156;hp=b8c87e9578fdf52ed49ca3439ca70888181faa9c;hpb=865af3fd7b192bda44dea65c6df125f233424f3e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts index b8c87e957..7d1d19588 100644 --- a/server/lib/client-html.ts +++ b/server/lib/client-html.ts @@ -9,7 +9,7 @@ import { FILES_CONTENT_HASH } from '../initializers/constants' import { join } from 'path' -import { escapeHTML, sha256 } from '../helpers/core-utils' +import { escapeHTML, isTestInstance, sha256 } from '../helpers/core-utils' import { VideoModel } from '../models/video/video' import { VideoPlaylistModel } from '../models/video/video-playlist' import validator from 'validator' @@ -177,7 +177,7 @@ export class ClientHtml { static async getEmbedHTML () { const path = ClientHtml.getEmbedPath() - if (ClientHtml.htmlCache[path]) return ClientHtml.htmlCache[path] + if (!isTestInstance() && ClientHtml.htmlCache[path]) return ClientHtml.htmlCache[path] const buffer = await readFile(path) @@ -230,7 +230,7 @@ export class ClientHtml { private static async getIndexHTML (req: express.Request, res: express.Response, paramLang?: string) { const path = ClientHtml.getIndexPath(req, res, paramLang) - if (ClientHtml.htmlCache[path]) return ClientHtml.htmlCache[path] + if (!isTestInstance() && ClientHtml.htmlCache[path]) return ClientHtml.htmlCache[path] const buffer = await readFile(path)