From a6140cab9246606c9354b58fbffc72a08b68bde6 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 22 Jul 2025 10:16:30 +0200 Subject: [PATCH] =?UTF-8?q?feat(ocelot.json):=20Aktualisierung=20der=20oce?= =?UTF-8?q?lot.json-Routen=20f=C3=BCr=20verbesserte=20Weiterleitung=20und?= =?UTF-8?q?=20Frontend-Integration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Aktualisierte bestehende Routen für Swagger und API-Endpunkte - Ersetzte /swagger/{route} durch /swagger/auth/{route} für den Auth-Dienst - Modifizierter Routenabgleich zur Unterstützung verschachtelter Routen (z. B. /api/{route1}/{route2}) - Hinzufügen von Routen für die Frontend-Angular-Anwendung, die auf Port 4200 läuft --- ocelot.Development.json | 61 ++++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/ocelot.Development.json b/ocelot.Development.json index 8b85bc9..c4d4816 100644 --- a/ocelot.Development.json +++ b/ocelot.Development.json @@ -15,7 +15,7 @@ ] }, { - "DownstreamPathTemplate": "/swagger/{route}", + "DownstreamPathTemplate": "/swagger/auth/{route}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { @@ -65,7 +65,7 @@ "UpstreamhttpsMethod": [ "Post" ] }, { - "DownstreamPathTemplate": "/api/Auth/user", + "DownstreamPathTemplate": "/api/{route}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { @@ -73,11 +73,16 @@ "Port": 7103 } ], - "UpstreamPathTemplate": "/api/Auth/user", - "UpstreamhttpsMethod": [ "Get" ] + "UpstreamPathTemplate": "/api/{route}", + "UpstreamhttpsMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] }, { - "DownstreamPathTemplate": "/api/{route}", + "DownstreamPathTemplate": "/api/{route1}/{route2}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { @@ -85,7 +90,7 @@ "Port": 7103 } ], - "UpstreamPathTemplate": "/api/{route}", + "UpstreamPathTemplate": "/api/{route1}/{route2}", "UpstreamhttpsMethod": [ "Get", "Post", @@ -94,17 +99,53 @@ ] }, { - "DownstreamPathTemplate": "/api/{route}/{id}", - "DownstreamScheme": "https", + "DownstreamPathTemplate": "/", + "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": 7103 + "Port": 4200 + } + ], + "UpstreamPathTemplate": "/", + "UpstreamhttpsMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] + }, + { + "DownstreamPathTemplate": "/{route}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 4200 } ], - "UpstreamPathTemplate": "/api/{route}{id}", + "UpstreamPathTemplate": "/{route}", "UpstreamhttpsMethod": [ "Get", + "Post", + "Put", + "Delete" + ] + }, + { + "DownstreamPathTemplate": "/{route1}/{route2}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 4200 + } + ], + "UpstreamPathTemplate": "/{route1}/{route2}", + "UpstreamhttpsMethod": [ + "Get", + "Post", + "Put", "Delete" ] }