feat: basePath-Konfiguration von .env in config.json verschoben
basePath wird jetzt in config.json gepflegt statt als NEXT_PUBLIC_BASE_PATH in .env.* Alle relevanten Code-Stellen lesen basePath dynamisch aus config.json Dokumentation und Beispiele in Markdown-Dateien entsprechend angepasst Erhöhte Flexibilität für Deployments ohne Rebuild
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
// utils/openInNewTab.js
|
||||
|
||||
export function openInNewTab(e, target) {
|
||||
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
|
||||
export async function openInNewTab(e, target) {
|
||||
const res = await fetch("/config.json");
|
||||
const config = await res.json();
|
||||
const basePath = config.basePath || "";
|
||||
const url = new URL(window.location.origin);
|
||||
const originWithoutPort = `${url.protocol}//${url.hostname}`; // ohne Port!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user