From c521b2482a8c977bf2362c0a4d1d13455bbbb058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Thu, 30 May 2024 18:49:24 +0900 Subject: [PATCH] refactor: tweak --- src/config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.ts b/src/config.ts index fddd45b..5bb9284 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,7 +1,7 @@ function parseRFC9110ListsLax(value: string | null): string[] { return ( value - ?.split(/(?<=^[^"]*|^(?:[^"]*"[^"]*"[^"]*)*),/) + ?.split(/(?<=^[^"]*(?:(?:"[^"]*){2})*),/) .map((value) => value.trim()) .filter((value) => value) ?? [] ) @@ -20,13 +20,13 @@ export function requestInit(request: Request) { "200-299": 86400, "400-599": 60, }, - } satisfies RequestInitCfProperties, + }, headers: { Accept: "text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8", "CDN-Loop": cdnLoop.concat(url.hostname).join(", "), "User-Agent": "Mozilla/5.0 (compatible; Summerflare; +https://github.com/misskey-dev/summerflare)", }, - } + } satisfies RequestInit } if (import.meta.vitest) {