Files
nodeMap/pages/api/[...path].js
ISA fb25f3a39d Fix: Ensure proper map object is passed to ShowAddStationPopup
The ShowAddStationPopup component was failing to close popups because it was using an uninitialized 'map' object. This commit changes the reference from 'map' to 'initMap' at the point where ShowAddStationPopup is rendered. This ensures that the correct map instance is being used, resolving the TypeError related to undefined properties when attempting to close the popup.

This change is critical for maintaining the functionality of our map interactions, particularly in scenarios where dynamic components are rendered based on user actions.
2024-05-03 07:20:51 +02:00

13 lines
480 B
JavaScript

// pages/api/[...path].js
import { createProxyMiddleware } from "http-proxy-middleware";
export default createProxyMiddleware({
target: "http://10.10.0.13", // Ziel-URL des Proxys
//target: "http://192.168.10.187:3000", // Ziel-URL des Proxys
changeOrigin: true,
pathRewrite: {
"^/api": "/", // Optional: Entfernt /api aus dem Pfad, wenn das Backend dies nicht erfordert
},
logLevel: "debug", // Setzt das Logging-Level auf "debug" für detaillierte Ausgaben
});