From 03961500e69787b6d6dcd386534a21b97604250d Mon Sep 17 00:00:00 2001 From: Gros Frumos Date: Sun, 15 Mar 2026 17:13:37 +0200 Subject: [PATCH] Use relative API paths for Tailscale access Replaced hardcoded http://localhost:8420/api with /api so the frontend works from any host (Tailscale, LAN, etc). Co-Authored-By: Claude Opus 4.6 --- web/frontend/src/api.ts | 2 +- web/frontend/src/views/ProjectView.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/frontend/src/api.ts b/web/frontend/src/api.ts index 89afee3..c912a0f 100644 --- a/web/frontend/src/api.ts +++ b/web/frontend/src/api.ts @@ -1,4 +1,4 @@ -const BASE = 'http://localhost:8420/api' +const BASE = '/api' async function get(path: string): Promise { const res = await fetch(`${BASE}${path}`) diff --git a/web/frontend/src/views/ProjectView.vue b/web/frontend/src/views/ProjectView.vue index 06e608f..d225ca3 100644 --- a/web/frontend/src/views/ProjectView.vue +++ b/web/frontend/src/views/ProjectView.vue @@ -133,7 +133,7 @@ async function addDecision() { category: decForm.value.category || undefined, tags, } - const res = await fetch('http://localhost:8420/api/decisions', { + const res = await fetch('/api/decisions', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body),