frontend api url
ci / docker (backend, backend/Dockerfile, backend) (push) Successful in 19s
ci / docker (frontend, frontend/Dockerfile, frontend) (push) Failing after 19s

This commit is contained in:
2025-10-12 13:37:54 +02:00
parent 9147442822
commit 5fe72aa9a5
4 changed files with 18 additions and 4 deletions
+1
View File
@@ -6,6 +6,7 @@
<title>Papercrate</title>
</head>
<body>
<script src="/config.js"></script>
<main id="app"></main>
</body>
</html>
+6 -1
View File
@@ -22,7 +22,12 @@ import {
} from 'react-router-dom';
import './styles.css';
const API_ROOT = (process.env.API_BASE_URL || '').replace(/\/$/, '');
const runtimeApiBase =
typeof window !== 'undefined' && window.__PAPERCRATE_API_BASE_URL
? window.__PAPERCRATE_API_BASE_URL
: '';
const API_ROOT = (runtimeApiBase || process.env.API_BASE_URL || '').replace(/\/$/, '');
const api = axios.create({
baseURL: API_ROOT ? `${API_ROOT}/api` : '/api',