Handling duplicate /submit in URL and adding local server to manifest.json

main
Amēlija I 2025-05-27 21:06:13 +03:00
parent 53d1767a2d
commit 5ba118cfa2
2 changed files with 5 additions and 2 deletions

View File

@ -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": {

View File

@ -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 }
});