From 5ba118cfa2d5a60e5529cba8e5c49e9348ec0bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Am=C4=93lija=20I?= <amelija_i@inbox.lv> Date: Tue, 27 May 2025 21:06:13 +0300 Subject: [PATCH] Handling duplicate /submit in URL and adding local server to manifest.json --- manifest.json | 3 ++- src/borderify.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 306926d..dd453a0 100644 --- a/manifest.json +++ b/manifest.json @@ -12,7 +12,8 @@ "host_permissions": [ "http://localhost:5000/*", - "https://zpdai.rkg.lv/*" + "https://zpdai.rkg.lv/*", + "http://127.0.0.1:5000/*" ], "content_security_policy": { diff --git a/src/borderify.js b/src/borderify.js index 7c48718..23dad17 100644 --- a/src/borderify.js +++ b/src/borderify.js @@ -98,7 +98,9 @@ function generateAndSaveId() { async function checkSessionStatus() { try { - const statusUrl = 'http://127.0.0.1:5000/api/session_status'; + const baseUrl = serverUrl.split('/submit')[0]; + const statusUrl = `${baseUrl}/api/session_status`; + const response = await fetch(statusUrl, { headers: { 'X-Password': password } });