From d363c46c5a00b8fa4a86cf398a1939615ad068bd Mon Sep 17 00:00:00 2001 From: Fabrice LAMANT Date: Wed, 4 Feb 2026 15:32:55 +0100 Subject: [PATCH] add proxy before url --- scraper/scraper.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scraper/scraper.ts b/scraper/scraper.ts index 4519baf62..c19e3cc3d 100644 --- a/scraper/scraper.ts +++ b/scraper/scraper.ts @@ -5,6 +5,7 @@ import { Cache } from "./cache"; import { ICSGenerator } from "./ics-generator"; import { Calendar, Event, Language, Sport, NOC, Competitor } from "./types"; +const proxy = process.env.HTTP_PROXY || ""; export class Scraper { private readonly cache = new Cache(); @@ -35,7 +36,7 @@ export class Scraper { this.debug(`getJSONData: url=${url}`); if (!this.cache.has(cacheKey)) { - const response = await fetch(url, { + const response = await fetch(`${proxy}${url}`, { "headers": { "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", "accept-language": "en-US,en;q=0.9,fr-FR;q=0.8,fr;q=0.7",