Compare commits
12 Commits
master
...
feat/user-
| Author | SHA1 | Date | |
|---|---|---|---|
| f60bb79920 | |||
| d113d4fcdd | |||
| 59963d7d4c | |||
| 5c4dec8e7c | |||
| 90a0751d09 | |||
| d2793f476a | |||
| a6140cab92 | |||
|
|
97a20fdb8f | ||
|
|
4da1bc7617 | ||
|
|
78a58568fc | ||
|
|
9844cd16e8 | ||
|
|
896eee35bd |
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"version": 1,
|
|
||||||
"isRoot": true,
|
|
||||||
"tools": {
|
|
||||||
"dotnet-ef": {
|
|
||||||
"version": "9.0.3",
|
|
||||||
"commands": [
|
|
||||||
"dotnet-ef"
|
|
||||||
],
|
|
||||||
"rollForward": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +1,12 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Version>1.0.0</Version>
|
<Version>1.1.0</Version>
|
||||||
<AssemblyVersion>1.0.0</AssemblyVersion>
|
<AssemblyVersion>1.1.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.0</FileVersion>
|
<FileVersion>1.1.0</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -14,6 +14,7 @@
|
|||||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.4.0" />
|
<PackageReference Include="NLog.Extensions.Logging" Version="5.4.0" />
|
||||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.4.0" />
|
<PackageReference Include="NLog.Web.AspNetCore" Version="5.4.0" />
|
||||||
<PackageReference Include="Ocelot" Version="23.4.3" />
|
<PackageReference Include="Ocelot" Version="23.4.3" />
|
||||||
|
<PackageReference Include="Ocelot.Cache.CacheManager" Version="23.4.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -2,6 +2,7 @@ using NLog;
|
|||||||
using NLog.Web;
|
using NLog.Web;
|
||||||
using Ocelot.DependencyInjection;
|
using Ocelot.DependencyInjection;
|
||||||
using Ocelot.Middleware;
|
using Ocelot.Middleware;
|
||||||
|
using Ocelot.Cache.CacheManager;
|
||||||
|
|
||||||
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
||||||
logger.Info("Logging initialized.");
|
logger.Info("Logging initialized.");
|
||||||
@ -23,7 +24,9 @@ try
|
|||||||
builder.Configuration.AddJsonFile($"ocelot{suffix}.json");
|
builder.Configuration.AddJsonFile($"ocelot{suffix}.json");
|
||||||
|
|
||||||
// Add Ocelot services
|
// Add Ocelot services
|
||||||
builder.Services.AddOcelot();
|
builder.Services
|
||||||
|
.AddOcelot()
|
||||||
|
.AddCacheManager(x => x.WithDictionaryHandle());
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
|
||||||
-->
|
|
||||||
<Project>
|
|
||||||
<PropertyGroup>
|
|
||||||
<WebPublishMethod>Package</WebPublishMethod>
|
|
||||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
|
||||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
|
||||||
<SiteUrlToLaunchAfterPublish />
|
|
||||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
|
||||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
|
||||||
<ProjectGuid>329f45bf-4c79-4a7b-9086-d6205617aa42</ProjectGuid>
|
|
||||||
<DesktopBuildPackageLocation>P:\Install .Net\0 DD - Smart UP\Gateway\WorkFlow\\.zip</DesktopBuildPackageLocation>
|
|
||||||
<PackageAsSingleFile>true</PackageAsSingleFile>
|
|
||||||
<DeployIisAppPath>Gateway</DeployIisAppPath>
|
|
||||||
<_TargetId>IISWebDeployPackage</_TargetId>
|
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
|
||||||
<SelfContained>false</SelfContained>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
@ -9,8 +9,8 @@
|
|||||||
"NLog": {
|
"NLog": {
|
||||||
"throwConfigExceptions": true,
|
"throwConfigExceptions": true,
|
||||||
"variables": {
|
"variables": {
|
||||||
"logDirectory": "E:\\LogFiles\\Digital Data\\workFlow.Gateway",
|
"logDirectory": "E:\\LogFiles\\Digital Data\\UserManager.Gateway",
|
||||||
"logFileNamePrefix": "${shortdate}-workFlow.Gateway"
|
"logFileNamePrefix": "${shortdate}-UserManager.Gateway"
|
||||||
},
|
},
|
||||||
"targets": {
|
"targets": {
|
||||||
"infoLogs": {
|
"infoLogs": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 7120
|
"Port": 7103
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/swagger/{route}",
|
"UpstreamPathTemplate": "/swagger/{route}",
|
||||||
@ -15,12 +15,12 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DownstreamPathTemplate": "/swagger/{route}",
|
"DownstreamPathTemplate": "/swagger/auth/{route}",
|
||||||
"DownstreamScheme": "https",
|
"DownstreamScheme": "http",
|
||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "172.24.12.39",
|
||||||
"Port": 7192
|
"Port": 9090
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/swagger/auth/{route}",
|
"UpstreamPathTemplate": "/swagger/auth/{route}",
|
||||||
@ -29,15 +29,15 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DownstreamPathTemplate": "/api/Auth/work-flow?cookie=false",
|
"DownstreamPathTemplate": "/api/Auth/user-manager?cookie=true",
|
||||||
"DownstreamScheme": "https",
|
"DownstreamScheme": "http",
|
||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "172.24.12.39",
|
||||||
"Port": 7192
|
"Port": 9090
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/api/Auth",
|
"UpstreamPathTemplate": "/api/Auth/login",
|
||||||
"UpstreamhttpsMethod": [ "Post" ]
|
"UpstreamhttpsMethod": [ "Post" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -46,10 +46,22 @@
|
|||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 7120
|
"Port": 7103
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/api/Auth/check",
|
"UpstreamPathTemplate": "/api/Auth/check",
|
||||||
|
"UpstreamhttpsMethod": [ "Get" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/Auth/logout",
|
||||||
|
"DownstreamScheme": "https",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 7103
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/Auth/logout",
|
||||||
"UpstreamhttpsMethod": [ "Post" ]
|
"UpstreamhttpsMethod": [ "Post" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -58,7 +70,7 @@
|
|||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 7120
|
"Port": 7103
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/api/{route}",
|
"UpstreamPathTemplate": "/api/{route}",
|
||||||
@ -70,22 +82,91 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DownstreamPathTemplate": "/api/{route}/{id}",
|
"DownstreamPathTemplate": "/api/{route1}/{route2}",
|
||||||
"DownstreamScheme": "https",
|
"DownstreamScheme": "https",
|
||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 7120
|
"Port": 7103
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/api/{route}{id}",
|
"UpstreamPathTemplate": "/api/{route1}/{route2}",
|
||||||
"UpstreamhttpsMethod": [
|
"UpstreamhttpsMethod": [
|
||||||
"Get",
|
"Get",
|
||||||
|
"Post",
|
||||||
|
"Put",
|
||||||
|
"Delete"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{route1}/{route2}/{route3}",
|
||||||
|
"DownstreamScheme": "https",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 7103
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{route1}/{route2}/{route3}",
|
||||||
|
"UpstreamhttpsMethod": [
|
||||||
|
"Get",
|
||||||
|
"Post",
|
||||||
|
"Put",
|
||||||
|
"Delete"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 4200
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/",
|
||||||
|
"UpstreamhttpsMethod": [
|
||||||
|
"Get",
|
||||||
|
"Post",
|
||||||
|
"Put",
|
||||||
|
"Delete"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{route}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 4200
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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"
|
"Delete"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"GlobalConfiguration": {
|
"GlobalConfiguration": {
|
||||||
"BaseUrl": "https://localhost:7052"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
129
ocelot.json
129
ocelot.json
@ -2,67 +2,79 @@
|
|||||||
"Routes": [
|
"Routes": [
|
||||||
{
|
{
|
||||||
"DownstreamPathTemplate": "/swagger/{route}",
|
"DownstreamPathTemplate": "/swagger/{route}",
|
||||||
"DownstreamScheme": "http",
|
"DownstreamScheme": "https",
|
||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 8088
|
"Port": 7103
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/swagger/{route}",
|
"UpstreamPathTemplate": "/swagger/{route}",
|
||||||
"UpstreamHttpMethod": [
|
"UpstreamhttpsMethod": [
|
||||||
"Get"
|
"Get"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DownstreamPathTemplate": "/swagger/{route}",
|
"DownstreamPathTemplate": "/swagger/auth/{route}",
|
||||||
"DownstreamScheme": "http",
|
"DownstreamScheme": "https",
|
||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 9090
|
"Port": 7192
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/swagger/auth/{route}",
|
"UpstreamPathTemplate": "/swagger/auth/{route}",
|
||||||
"UpstreamHttpMethod": [
|
"UpstreamhttpsMethod": [
|
||||||
"Get"
|
"Get"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DownstreamPathTemplate": "/api/Auth/work-flow?cookie=false",
|
"DownstreamPathTemplate": "/api/Auth/user-manager?cookie=true",
|
||||||
"DownstreamScheme": "http",
|
"DownstreamScheme": "https",
|
||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 9090
|
"Port": 7192
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/api/Auth",
|
"UpstreamPathTemplate": "/api/Auth/login",
|
||||||
"UpstreamHttpMethod": [ "Post" ]
|
"UpstreamhttpsMethod": [ "Post" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DownstreamPathTemplate": "/api/Auth/check",
|
"DownstreamPathTemplate": "/api/Auth/check",
|
||||||
"DownstreamScheme": "http",
|
"DownstreamScheme": "https",
|
||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 8088
|
"Port": 7103
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/api/Auth/check",
|
"UpstreamPathTemplate": "/api/Auth/check",
|
||||||
"UpstreamHttpMethod": [ "Post" ]
|
"UpstreamhttpsMethod": [ "Get" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DownstreamPathTemplate": "/api/{route}",
|
"DownstreamPathTemplate": "/api/Auth/logout",
|
||||||
"DownstreamScheme": "http",
|
"DownstreamScheme": "https",
|
||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 8088
|
"Port": 7103
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/Auth/logout",
|
||||||
|
"UpstreamhttpsMethod": [ "Post" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{route}",
|
||||||
|
"DownstreamScheme": "https",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 7103
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/api/{route}",
|
"UpstreamPathTemplate": "/api/{route}",
|
||||||
"UpstreamHttpMethod": [
|
"UpstreamhttpsMethod": [
|
||||||
"Get",
|
"Get",
|
||||||
"Post",
|
"Post",
|
||||||
"Put",
|
"Put",
|
||||||
@ -70,22 +82,91 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"DownstreamPathTemplate": "/api/{route}/{id}",
|
"DownstreamPathTemplate": "/api/{route1}/{route2}",
|
||||||
|
"DownstreamScheme": "https",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 7103
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{route1}/{route2}",
|
||||||
|
"UpstreamhttpsMethod": [
|
||||||
|
"Get",
|
||||||
|
"Post",
|
||||||
|
"Put",
|
||||||
|
"Delete"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{route1}/{route2}/{route3}",
|
||||||
|
"DownstreamScheme": "https",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 7103
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{route1}/{route2}/{route3}",
|
||||||
|
"UpstreamhttpsMethod": [
|
||||||
|
"Get",
|
||||||
|
"Post",
|
||||||
|
"Put",
|
||||||
|
"Delete"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/",
|
||||||
"DownstreamScheme": "http",
|
"DownstreamScheme": "http",
|
||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 8088
|
"Port": 4200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpstreamPathTemplate": "/api/{route}{id}",
|
"UpstreamPathTemplate": "/",
|
||||||
"UpstreamHttpMethod": [
|
"UpstreamhttpsMethod": [
|
||||||
"Get",
|
"Get",
|
||||||
|
"Post",
|
||||||
|
"Put",
|
||||||
|
"Delete"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/{route}",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 4200
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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"
|
"Delete"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"GlobalConfiguration": {
|
"GlobalConfiguration": {
|
||||||
"BaseUrl": "https://localhost:8443"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user