diff --git a/frontend/src/api.js b/frontend/src/api.js index e28fa3b..7043287 100644 --- a/frontend/src/api.js +++ b/frontend/src/api.js @@ -172,7 +172,7 @@ class API { async fetch(url, options = {}) { const accessToken = await this.getValidAccessToken() - const response = await window.fetch('/api' + url, { + const response = await window.fetch(config.apiUrl + '/api' + url, { ...options, headers: { ...(options.headers || {}), diff --git a/frontend/src/config.dev.json b/frontend/src/config.dev.json index 9b356af..9a07ac0 100644 --- a/frontend/src/config.dev.json +++ b/frontend/src/config.dev.json @@ -1,4 +1,5 @@ { + "apiUrl": "http://localhost:3001", "auth": { "server": "http://localhost:3000", "clientId": "b730f8d2-d93c-4c68-9ff0-dfac8da76ee2", diff --git a/frontend/src/config.json.example b/frontend/src/config.json.example index e7ca497..58e91f8 100644 --- a/frontend/src/config.json.example +++ b/frontend/src/config.json.example @@ -1,4 +1,5 @@ { + "apiUrl": "https://api.example.com", "auth": { "server": "https://api.example.com", "clientId": "CHANGEME",