Make sure fonts are not copied out

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2026-07-14 12:05:39 -05:00
committed by GitHub
parent 1b97350320
commit ca4afeb9e0
+3 -6
View File
@@ -1,13 +1,12 @@
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { createReadStream } from 'node:fs';
import { readFile } from 'node:fs/promises';
import { join } from 'node:path';
import { protocol } from 'electron';
import type { OptionalResourceService } from './OptionalResourceService.main.ts';
import { getAppRootDir } from '../ts/util/appRootDir.main.ts';
import { toWebStream } from '../ts/util/toWebStream.node.ts';
import * as Errors from '../ts/types/errors.std.ts';
import { createLogger } from '../ts/logging/log.std.ts';
@@ -67,10 +66,8 @@ export class AssetService {
const path = pathname.slice(1);
if (LOCAL_ASSETS.has(path)) {
const stream = createReadStream(
join(getAppRootDir(), ...path.split('/'))
);
return new Response(toWebStream(stream), {
const content = await readFile(join(getAppRootDir(), ...path.split('/')));
return new Response(content, {
status: 200,
headers: {
'cache-control': 'public, max-age=2592000, immutable',