From e1e04a4835fe77cd06620edf2e10cbb408de1a73 Mon Sep 17 00:00:00 2001 From: BTCforPlebs Date: Sat, 27 Sep 2025 12:23:32 -0400 Subject: [PATCH] CORS error fix --- .DS_Store | Bin 8196 -> 6148 bytes public/assets/js/home.js | 14 ------ public/index.html | 91 ++++++++++++++++++--------------------- server.js | 10 ++++- 4 files changed, 51 insertions(+), 64 deletions(-) delete mode 100644 public/assets/js/home.js diff --git a/.DS_Store b/.DS_Store index bb234ff1d612358604ad6521bf978c9f278113c6..8b81397a7283811926040c96fd19e495498e0119 100644 GIT binary patch delta 137 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50$jGxXU^g=(&tx8flF1@MIh!{L zWiyJH7@O)Sm>F8u>L^rO8X4#)n3$PNHWX>vST4o5n4N<|kQrzM5D0Js30IJ58w8=Vhq5vmN`Nc{hA@Uqh7=$xpP|?@ zCqFqUCqD^f0nl1$Ag%Hr41g>K1`^EVLKr&vI%|W7vAL0sf{A&pjzYDCfu)Xup@D(L z6`DeR56Me z8=L7U7@L}c9Aar?0CbbF8PFX~n>X`BGjmCB15I=Vh3;lSj_=Hq`9(Y@`}1&cFhT;J KVRJms9A*F%YgViP diff --git a/public/assets/js/home.js b/public/assets/js/home.js deleted file mode 100644 index fe07336..0000000 --- a/public/assets/js/home.js +++ /dev/null @@ -1,14 +0,0 @@ -function toggleFolder(folderId, buttonId) { - const folder = document.getElementById(folderId); - const button = document.getElementById(buttonId); - if (!folder || !button) return; - - if (folder.style.display === "none" || folder.style.display === "") { - folder.style.display = "block"; - button.innerHTML = button.innerHTML.replace("↓", "↑"); - - } else { - folder.style.display = "none"; - button.innerHTML = button.innerHTML.replace("↑", "↓"); - } -} diff --git a/public/index.html b/public/index.html index 383c52e..b042be1 100644 --- a/public/index.html +++ b/public/index.html @@ -19,8 +19,6 @@ - - @@ -29,10 +27,10 @@ -
-

Welcome to BTCforPlebs

-

A place to help ordinary people learn about Bitcoin

- Profile Picture + + 🟢 = online | 🔴 = offline | ⚪️ = external site +

+
+ + diff --git a/server.js b/server.js index 277b917..28bd4f1 100644 --- a/server.js +++ b/server.js @@ -46,9 +46,15 @@ app.get('/api/link-status', async (req, res) => { } }); -// Serve static files -app.use(express.static(path.join(__dirname, 'public'))); +// ... previous middleware ... + +// Serve static files from /public, including dot‑folders such as .well-known +app.use( + express.static(path.join(__dirname, 'public'), { dotfiles: 'allow' }) +); + +// Start the server app.listen(PORT, () => { console.log(`🚀 Server running at http://0.0.0.0:${PORT}`); });