From e2db141af4063654c3a14bbd82b25cfd03b604ca Mon Sep 17 00:00:00 2001 From: John Bradley Date: Thu, 15 Feb 2024 11:07:32 -0500 Subject: [PATCH] Fix React API URL Use absolute path for the API URL to fix a problem where the relative path was wrong for nested pages. Fixes #88 --- andromeda-ui/next.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/andromeda-ui/next.config.js b/andromeda-ui/next.config.js index bf22da4..55a5ec9 100644 --- a/andromeda-ui/next.config.js +++ b/andromeda-ui/next.config.js @@ -2,7 +2,7 @@ const { PHASE_DEVELOPMENT_SERVER } = require("next/constants"); module.exports = (phase, { defaultConfig }) => { - let apiURL = "api"; + let apiURL = "/api"; if (phase === PHASE_DEVELOPMENT_SERVER) { apiURL = "http://127.0.0.1:5000/api"; }