From 4aa2c76e77b6fe05108687b7937fd0caed4a4aa3 Mon Sep 17 00:00:00 2001 From: BTCforPlebs Date: Thu, 9 Oct 2025 22:22:10 -0400 Subject: [PATCH] , --- checklinks.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/checklinks.js b/checklinks.js index 94ea5df..e6b52f0 100644 --- a/checklinks.js +++ b/checklinks.js @@ -17,22 +17,22 @@ const links = [ "https://live.btcforplebs.com", "https://explorer.btcforplebs.com", "https://nsec.btcforplebs.com", - "https://flotilla.btcforplebs.com" + "https://flotilla.btcforplebs.com", "https://jumble.btcforplebs.com" ]; // Optional: Only allow internal requests if you're not exposing this publicly -app.use((req, res, next) => { - const origin = req.headers.origin || 'unknown'; - console.log(`Request: ${req.method} ${req.url} | Origin: ${origin}`); - res.header("Access-Control-Allow-Origin", "*"); - res.header("Access-Control-Allow-Methods", "GET, OPTIONS"); - res.header("Access-Control-Allow-Headers", "Content-Type"); - - if (req.method === 'OPTIONS') { - return res.sendStatus(200); - } - next(); + app.use((req, res, next) => { + const origin = req.headers.origin || 'unknown'; + console.log(`Request: ${req.method} ${req.url} | Origin: ${origin}`); + res.header("Access-Control-Allow-Headers", "Content-Type"); + res.header("Access-Control-Allow-Origin", "*"); + res.header("Access-Control-Allow-Methods", "GET, OPTIONS"); + + if (req.method === 'OPTIONS') { + return res.sendStatus(200); + } + next(); }); app.get("/", (req, res) => {