Compare commits

..

1 Commits

Author SHA1 Message Date
5843e9efa8 feat(logging): enable NLog only in non-development environments 2025-07-22 18:08:52 +02:00
5 changed files with 31 additions and 155 deletions

View File

@ -4,9 +4,9 @@
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks> <TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Version>1.2.0</Version> <Version>1.0.0</Version>
<AssemblyVersion>1.2.0</AssemblyVersion> <AssemblyVersion>1.0.0</AssemblyVersion>
<FileVersion>1.2.0</FileVersion> <FileVersion>1.0.0</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -9,7 +9,7 @@ logger.Info("Logging initialized.");
try try
{ {
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
if (!builder.Environment.IsDevelopment()) if (!builder.Environment.IsDevelopment())

View File

@ -11,7 +11,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish> <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data> <ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>329f45bf-4c79-4a7b-9086-d6205617aa42</ProjectGuid> <ProjectGuid>329f45bf-4c79-4a7b-9086-d6205617aa42</ProjectGuid>
<DesktopBuildPackageLocation>P:\Install .Net\0 DD - Smart UP\Gateway\EnvelopeGeneratorGen\Net9Win64\$(Version)\$(Version).zip</DesktopBuildPackageLocation> <DesktopBuildPackageLocation>P:\Install .Net\0 DD - Smart UP\Gateway\WorkFlow\\.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile> <PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Gateway</DeployIisAppPath> <DeployIisAppPath>Gateway</DeployIisAppPath>
<_TargetId>IISWebDeployPackage</_TargetId> <_TargetId>IISWebDeployPackage</_TargetId>

View File

@ -6,87 +6,16 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 7120
} }
], ],
"UpstreamPathTemplate": "/swagger/{route}", "UpstreamPathTemplate": "/swagger/{route}",
"UpstreamHttpMethod": [ "UpstreamhttpsMethod": [
"Get", "Get"
"Post",
"Put",
"Delete"
] ]
}, },
{ {
"DownstreamPathTemplate": "/swagger/{route1}/{route2}", "DownstreamPathTemplate": "/swagger/{route}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8088
}
],
"UpstreamPathTemplate": "/swagger/{route1}/{route2}",
"UpstreamHttpMethod": [
"Get",
"Post",
"Put",
"Delete"
]
},
{
"DownstreamPathTemplate": "/scalar",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8088
}
],
"UpstreamPathTemplate": "/scalar",
"UpstreamHttpMethod": [
"Get",
"Post",
"Put",
"Delete"
]
},
{
"DownstreamPathTemplate": "/scalar/{route}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8088
}
],
"UpstreamPathTemplate": "/scalar/{route}",
"UpstreamHttpMethod": [
"Get",
"Post",
"Put",
"Delete"
]
},
{
"DownstreamPathTemplate": "/scalar/{route1}/{route2}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8088
}
],
"UpstreamPathTemplate": "/scalar/{route1}/{route2}",
"UpstreamHttpMethod": [
"Get",
"Post",
"Put",
"Delete"
]
},
{
"DownstreamPathTemplate": "/api/Auth/sign-flow-gen?cookie={cookie}",
"DownstreamScheme": "https", "DownstreamScheme": "https",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
@ -94,11 +23,13 @@
"Port": 7192 "Port": 7192
} }
], ],
"UpstreamPathTemplate": "/api/Auth?cookie={cookie}", "UpstreamPathTemplate": "/swagger/auth/{route}",
"UpstreamHttpMethod": [ "Post" ] "UpstreamhttpsMethod": [
"Get"
]
}, },
{ {
"DownstreamPathTemplate": "/api/Auth/sign-flow-gen?cookie=false", "DownstreamPathTemplate": "/api/Auth/work-flow?cookie=false",
"DownstreamScheme": "https", "DownstreamScheme": "https",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
@ -107,19 +38,19 @@
} }
], ],
"UpstreamPathTemplate": "/api/Auth", "UpstreamPathTemplate": "/api/Auth",
"UpstreamHttpMethod": [ "Post" ] "UpstreamhttpsMethod": [ "Post" ]
}, },
{ {
"DownstreamPathTemplate": "/api/Auth/sign-flow-gen/login", "DownstreamPathTemplate": "/api/Auth/check",
"DownstreamScheme": "https", "DownstreamScheme": "https",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7192 "Port": 7120
} }
], ],
"UpstreamPathTemplate": "/api/Auth/form", "UpstreamPathTemplate": "/api/Auth/check",
"UpstreamHttpMethod": [ "Post" ] "UpstreamhttpsMethod": [ "Post" ]
}, },
{ {
"DownstreamPathTemplate": "/api/{route}", "DownstreamPathTemplate": "/api/{route}",
@ -127,11 +58,11 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 7120
} }
], ],
"UpstreamPathTemplate": "/api/{route}", "UpstreamPathTemplate": "/api/{route}",
"UpstreamHttpMethod": [ "UpstreamhttpsMethod": [
"Get", "Get",
"Post", "Post",
"Put", "Put",
@ -144,16 +75,17 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 7120
} }
], ],
"UpstreamPathTemplate": "/api/{route}{id}", "UpstreamPathTemplate": "/api/{route}{id}",
"UpstreamHttpMethod": [ "UpstreamhttpsMethod": [
"Get", "Get",
"Delete" "Delete"
] ]
} }
], ],
"GlobalConfiguration": { "GlobalConfiguration": {
"BaseUrl": "https://localhost:7052"
} }
} }

View File

@ -11,78 +11,21 @@
], ],
"UpstreamPathTemplate": "/swagger/{route}", "UpstreamPathTemplate": "/swagger/{route}",
"UpstreamHttpMethod": [ "UpstreamHttpMethod": [
"Get", "Get"
"Post",
"Put",
"Delete"
] ]
}, },
{ {
"DownstreamPathTemplate": "/swagger/{route1}/{route2}", "DownstreamPathTemplate": "/swagger/{route}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 9090
} }
], ],
"UpstreamPathTemplate": "/swagger/{route1}/{route2}", "UpstreamPathTemplate": "/swagger/auth/{route}",
"UpstreamHttpMethod": [ "UpstreamHttpMethod": [
"Get", "Get"
"Post",
"Put",
"Delete"
]
},
{
"DownstreamPathTemplate": "/scalar",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8088
}
],
"UpstreamPathTemplate": "/scalar",
"UpstreamHttpMethod": [
"Get",
"Post",
"Put",
"Delete"
]
},
{
"DownstreamPathTemplate": "/scalar/{route}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8088
}
],
"UpstreamPathTemplate": "/scalar/{route}",
"UpstreamHttpMethod": [
"Get",
"Post",
"Put",
"Delete"
]
},
{
"DownstreamPathTemplate": "/scalar/{route1}/{route2}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8088
}
],
"UpstreamPathTemplate": "/scalar/{route1}/{route2}",
"UpstreamHttpMethod": [
"Get",
"Post",
"Put",
"Delete"
] ]
}, },
{ {
@ -91,7 +34,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 9090
} }
], ],
"UpstreamPathTemplate": "/api/Auth", "UpstreamPathTemplate": "/api/Auth",
@ -143,5 +86,6 @@
} }
], ],
"GlobalConfiguration": { "GlobalConfiguration": {
"BaseUrl": "https://localhost:8443"
} }
} }