diff --git a/config.js b/config.js index 8ce8fe3..bb886cf 100644 --- a/config.js +++ b/config.js @@ -4,6 +4,10 @@ module.exports = { allowedOrigins: [ 'http://localhost:5252', 'https://btcforplebs.com', - 'https://www.btcforplebs.com' + 'https://www.btcforplebs.com', + 'http://btcforplebs.com', + 'http://www.btcforplebs.com', + 'https://services.btcforplebs.com', + 'http://services.btcforplebs.com' ] }; \ No newline at end of file diff --git a/public/assets/js/home.js b/public/assets/js/home.js index e0e63ad..ee06ce3 100644 --- a/public/assets/js/home.js +++ b/public/assets/js/home.js @@ -4,7 +4,7 @@ let linkStatuses = {}; // Fetch statuses on page load document.addEventListener('DOMContentLoaded', () => { // Fetch statuses immediately but keep folders closed - fetch("http://localhost:5252/api/link-status") + fetch("https://services.btcforplebs.com/api/link-status") .then(res => res.json()) .then(statuses => { linkStatuses = statuses; // Store for later use @@ -43,7 +43,7 @@ function toggleFolder(folderId, buttonId) { if (Object.keys(linkStatuses).length > 0) { updateFolderStatuses(folder, linkStatuses); } else { - fetch("http://localhost:5252/api/link-status") + fetch("https://services.btcforplebs.com/api/link-status") .then(res => res.json()) .then(statuses => { linkStatuses = statuses; @@ -60,7 +60,7 @@ async function init() { try { // Fetch the status first console.log("Fetching statuses..."); - const response = await fetch("http://localhost:5252/api/link-status"); + const response = await fetch("https://services.btcforplebs.com/api/link-status"); const statuses = await response.json(); console.log("Got statuses:", statuses); diff --git a/public/assets/js/scripts.js b/public/assets/js/scripts.js index 4ff73de..4d0799e 100644 --- a/public/assets/js/scripts.js +++ b/public/assets/js/scripts.js @@ -82,4 +82,5 @@ document.addEventListener('DOMContentLoaded', () => { if (updateText) { updateText.textContent = 'Last update: Error fetching data.'; } - }); \ No newline at end of file + }); + }); \ No newline at end of file