From 99180035e3d974aa4adfcb15d9d516b705e5089d Mon Sep 17 00:00:00 2001 From: Bauke Date: Sat, 15 Jul 2023 16:00:17 +0200 Subject: [PATCH] Add a user agent to the Intercooler request. --- source/utilities/http.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/utilities/http.ts b/source/utilities/http.ts index fd7f005..7dd1b5b 100644 --- a/source/utilities/http.ts +++ b/source/utilities/http.ts @@ -22,10 +22,11 @@ export async function makeIntercoolerRequest( const ic: RequestInit = { headers: { + // Change the user agent and add an extra header so it's clear this isn't + // a request actually sent by Intercooler but by Tildes ReExtended. + "User-Agent": `Tildes ReExtended (${$browser}, version ${$version})`, "X-CSRF-Token": csrfToken, "X-IC-Request": "true", - // Include this header so it's clear this isn't a request actually sent by - // Intercooler but by Tildes ReExtended. "X-TRX-Request": "true", }, referrer: "https://tildes.net",