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');