diff --git a/partials/landingpage/admin/dashboard.php b/partials/landingpage/admin/dashboard.php
index 9154d4b..758836b 100644
--- a/partials/landingpage/admin/dashboard.php
+++ b/partials/landingpage/admin/dashboard.php
@@ -2,6 +2,7 @@
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
$appBaseUrl = rtrim($GLOBALS['app_base_url'] ?? '', '/');
$assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
+$appApiBase = rtrim($GLOBALS['app_api_base'] ?? '', '/');
$debugRedirect = isset($_GET['debug_redirect']);
?>
@@ -12,6 +13,10 @@ $debugRedirect = isset($_GET['debug_redirect']);
Email Template System – Dashboard
+
diff --git a/partials/landingpage/admin/profile.php b/partials/landingpage/admin/profile.php
index 52e4b77..9a2d6f9 100644
--- a/partials/landingpage/admin/profile.php
+++ b/partials/landingpage/admin/profile.php
@@ -2,6 +2,7 @@
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
$appBaseUrl = rtrim($GLOBALS['app_base_url'] ?? '', '/');
$assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
+$appApiBase = rtrim($GLOBALS['app_api_base'] ?? '', '/');
$debugRedirect = isset($_GET['debug_redirect']);
?>
@@ -12,6 +13,10 @@ $debugRedirect = isset($_GET['debug_redirect']);
Email Template System – Konto
+
diff --git a/partials/landingpage/admin/settings.php b/partials/landingpage/admin/settings.php
index b211818..a7d2f77 100644
--- a/partials/landingpage/admin/settings.php
+++ b/partials/landingpage/admin/settings.php
@@ -2,6 +2,7 @@
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
$appBaseUrl = rtrim($GLOBALS['app_base_url'] ?? '', '/');
$assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
+$appApiBase = rtrim($GLOBALS['app_api_base'] ?? '', '/');
$debugRedirect = isset($_GET['debug_redirect']);
?>
@@ -12,6 +13,10 @@ $debugRedirect = isset($_GET['debug_redirect']);
Email Template System – Administration
+
diff --git a/public/assets/js/api.js b/public/assets/js/api.js
index b8203b7..c88f5ee 100644
--- a/public/assets/js/api.js
+++ b/public/assets/js/api.js
@@ -1,5 +1,8 @@
// assets/js/api.js
-const API = "api.php";
+const BASE = (window.APP_BASE_URL || '').replace(/\/$/, '');
+const API =
+ (window.APP_API_BASE && window.APP_API_BASE.replace(/\/$/, '')) ||
+ (BASE ? `${BASE}/api.php` : 'api.php');
/** ---- intern: Hilfen ---- */
function withTs(url) {
@@ -106,4 +109,3 @@ export function toast(msg, ok = true, opts = {}) {
(ok ? console.log : console.error)(msg);
}
}
-
diff --git a/public/index.php b/public/index.php
index 8e65d46..2ad6e9d 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,6 +1,8 @@
@@ -15,6 +17,10 @@ $assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
html.auth-pending body { visibility: hidden; }
+