Compare commits

...

3 Commits

Author SHA1 Message Date
Developer 02
0d0e4675ad Merge branch 'master' into feat/envelope-generator.gen.api 2025-05-09 23:21:28 +02:00
Developer 02
6ade388cd7 Enhance logging configuration in Program.cs
Initialized logging by clearing providers, setting minimum
level to Trace, and configuring NLog as the logging provider.
2025-05-09 23:20:27 +02:00
Developer 02
5f21002e4f Update port configuration in ocelot.Development.json
Changed the `Port` number for `DownstreamHostAndPorts` from `7174` to `8088` across multiple route definitions. Updated `DownstreamPathTemplate` and `UpstreamPathTemplate` for paths including `/swagger/{route}`, `/scalar`, and `/api/{route}`. Corrected the `UpstreamPathTemplate` for `/api/{route}/{id}` by removing an unnecessary slash before `{id}`.
2025-05-09 23:19:23 +02:00
2 changed files with 11 additions and 7 deletions

View File

@ -10,6 +10,10 @@ try
{ {
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
builder.Logging.ClearProviders();
builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
builder.Host.UseNLog();
// Make sure to add the Ocelot configuration file // Make sure to add the Ocelot configuration file
var suffix = builder.Environment.IsDevelopment() ? ".Development" : ""; var suffix = builder.Environment.IsDevelopment() ? ".Development" : "";
builder.Configuration.AddJsonFile($"ocelot{suffix}.json"); builder.Configuration.AddJsonFile($"ocelot{suffix}.json");

View File

@ -6,7 +6,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/swagger/{route}", "UpstreamPathTemplate": "/swagger/{route}",
@ -23,7 +23,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/swagger/{route1}/{route2}", "UpstreamPathTemplate": "/swagger/{route1}/{route2}",
@ -40,7 +40,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/scalar", "UpstreamPathTemplate": "/scalar",
@ -57,7 +57,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/scalar/{route}", "UpstreamPathTemplate": "/scalar/{route}",
@ -74,7 +74,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/scalar/{route1}/{route2}", "UpstreamPathTemplate": "/scalar/{route1}/{route2}",
@ -127,7 +127,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/api/{route}", "UpstreamPathTemplate": "/api/{route}",
@ -144,7 +144,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/api/{route}{id}", "UpstreamPathTemplate": "/api/{route}{id}",