asd
This commit is contained in:
@@ -47,7 +47,6 @@
|
||||
B.BASE_PATH_CONFIG = B.BASE_PATH_BRIDGE;
|
||||
const apiFallback = '/api.php';
|
||||
B.API_BASE = B.API_BASE || apiFallback;
|
||||
B.STORAGE_URL_BASE = B.STORAGE_URL_BASE || B.API_BASE;
|
||||
B.API_KERNEL_URL = B.API_KERNEL_URL || B.API_BASE;
|
||||
|
||||
B.GrapesJSPlugins = [];
|
||||
@@ -260,9 +259,8 @@
|
||||
}
|
||||
|
||||
// Speicherkonfiguration extrahieren, um die URL in onLoad zu verwenden.
|
||||
// 🎯 KORREKTUR für mehr Flexibilität: Verwende B.STORAGE_URL_BASE, falls gesetzt, anstatt window.location.href.
|
||||
// Verwenden Sie B.API_BASE (Standard /api/editor) als Fallback für die Storage-URL
|
||||
const storageBase = B.STORAGE_URL_BASE || B.API_BASE; // B.API_BASE sollte jetzt korrekt sein
|
||||
// Verwenden Sie immer die zentrale API-Basis
|
||||
const storageBase = B.API_BASE;
|
||||
|
||||
// Robustes Anhängen von Query-Parametern.
|
||||
// Prüft, ob 'storageBase' bereits Query-Parameter enthält ('?')
|
||||
@@ -270,8 +268,8 @@
|
||||
|
||||
const resourceName = (window.__editorMode || 'templates');
|
||||
const entityId = (window.__editorId || 0);
|
||||
const loadUrl = `${storageBase}${actionSeparator}action=${resourceName}.get&id=${entityId}`;
|
||||
const storeUrl = `${storageBase}${actionSeparator}action=${resourceName}.update&id=${entityId}`;
|
||||
const loadUrl = `${storageBase}${actionSeparator}action=${encodeURIComponent(resourceName)}.get&id=${encodeURIComponent(entityId)}`;
|
||||
const storeUrl = `${storageBase}${actionSeparator}action=${encodeURIComponent(resourceName)}.update&id=${encodeURIComponent(entityId)}`;
|
||||
|
||||
const storageConf = {
|
||||
type: 'remote',
|
||||
@@ -292,8 +290,8 @@
|
||||
...options
|
||||
};
|
||||
fetchOptions.headers = {
|
||||
'Content-Type': 'application/json',
|
||||
...(options?.headers || {}),
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
if (!fetchOptions.credentials || fetchOptions.credentials === 'omit') {
|
||||
fetchOptions.credentials = 'include';
|
||||
|
||||
Reference in New Issue
Block a user