From 79edebe63298734a8b13b31cfcafdbd2b4ad3588 Mon Sep 17 00:00:00 2001 From: Bobban Rydh Date: Tue, 2 Jun 2026 01:40:37 +0200 Subject: [PATCH] =?UTF-8?q?fels=C3=B6kning=20docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/dns.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/api/dns.js b/frontend/src/api/dns.js index e38adbe..6b9e8be 100644 --- a/frontend/src/api/dns.js +++ b/frontend/src/api/dns.js @@ -1,4 +1,8 @@ -const BASE = (process.env.REACT_APP_API_URL || 'http://localhost:3001') + '/api'; +// In development REACT_APP_API_URL points directly to the backend. +// In Docker, leave it unset — nginx proxies /api to the backend container. +const BASE = process.env.REACT_APP_API_URL + ? process.env.REACT_APP_API_URL + '/api' + : '/api'; export function getToken() { return localStorage.getItem('dns_token');