From 795d41ff4274c0f080c6dee7d2ab8d379009bbf4 Mon Sep 17 00:00:00 2001 From: jorgearma Date: Tue, 21 Apr 2026 00:33:02 +0200 Subject: [PATCH] fix: add User-Agent header to avoid bot-blocking on security.txt fetch --- api/security-txt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/security-txt.js b/api/security-txt.js index c4acdb8..df89b0c 100644 --- a/api/security-txt.js +++ b/api/security-txt.js @@ -74,7 +74,7 @@ const securityTxtHandler = async (urlParam) => { async function fetchSecurityTxt(baseURL, path) { return new Promise((resolve, reject) => { const url = new URL(path, baseURL); - https.get(url.toString(), (res) => { + https.get(url.toString(), { headers: { 'User-Agent': 'curl/8.0.0' } }, (res) => { if (res.statusCode === 200) { let data = ''; res.on('data', (chunk) => {