5 Commits

5 changed files with 65 additions and 59 deletions

View File

@@ -24,10 +24,7 @@ try
app.UseAuthorization(); app.UseAuthorization();
// Use Ocelot middleware in an appropriate way // Use Ocelot middleware in an appropriate way
app.UseEndpoints(endpoints => app.MapControllers();
{
endpoints.MapControllers();
});
app.UseOcelot().Wait(); app.UseOcelot().Wait();

View File

@@ -0,0 +1,19 @@
<?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\$(Version)\$(Version).zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Gateway</DeployIisAppPath>
<_TargetId>IISWebDeployPackage</_TargetId>
</PropertyGroup>
</Project>

View File

@@ -23,7 +23,7 @@
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": true, "launchBrowser": true,
"launchUrl": "swagger", "launchUrl": "swagger/index.html",
"applicationUrl": "https://localhost:7052;http://localhost:5028", "applicationUrl": "https://localhost:7052;http://localhost:5028",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"

View File

@@ -2,72 +2,67 @@
"Routes": [ "Routes": [
{ {
"DownstreamPathTemplate": "/swagger/{route}", "DownstreamPathTemplate": "/swagger/{route}",
"DownstreamScheme": "http", "DownstreamScheme": "https",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 9090 "Port": 7120
} }
], ],
"UpstreamPathTemplate": "/swagger/auth/{route}", "UpstreamPathTemplate": "/swagger/{route}",
"UpstreamHttpMethod": [ "UpstreamhttpsMethod": [
"Get" "Get"
] ]
}, },
{ {
"DownstreamPathTemplate": "/swagger/{route}", "DownstreamPathTemplate": "/swagger/{route}",
"DownstreamScheme": "http", "DownstreamScheme": "https",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 7192
} }
], ],
"UpstreamPathTemplate": "/swagger/{route}", "UpstreamPathTemplate": "/swagger/auth/{route}",
"UpstreamHttpMethod": [ "UpstreamhttpsMethod": [
"Get" "Get"
] ]
}, },
{ {
"DownstreamPathTemplate": "/api/Auth/{route}", "DownstreamPathTemplate": "/api/Auth/work-flow?cookie=false",
"DownstreamScheme": "http", "DownstreamScheme": "https",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 7192
} }
], ],
"UpstreamPathTemplate": "/api/Auth/{route}", "UpstreamPathTemplate": "/api/Auth",
"UpstreamHttpMethod": [ "UpstreamhttpsMethod": [ "Post" ]
"Get",
"Post"
]
}, },
{ {
"DownstreamPathTemplate": "/api/Auth/login/{id}", "DownstreamPathTemplate": "/api/Auth/check",
"DownstreamScheme": "http", "DownstreamScheme": "https",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 7120
} }
], ],
"UpstreamPathTemplate": "/api/Auth/login/{id}", "UpstreamPathTemplate": "/api/Auth/check",
"UpstreamHttpMethod": [ "UpstreamhttpsMethod": [ "Post" ]
"Post"
]
}, },
{ {
"DownstreamPathTemplate": "/api/{route}", "DownstreamPathTemplate": "/api/{route}",
"DownstreamScheme": "http", "DownstreamScheme": "https",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 7120
} }
], ],
"UpstreamPathTemplate": "/api/{route}", "UpstreamPathTemplate": "/api/{route}",
"UpstreamHttpMethod": [ "UpstreamhttpsMethod": [
"Get", "Get",
"Post", "Post",
"Put", "Put",
@@ -76,15 +71,15 @@
}, },
{ {
"DownstreamPathTemplate": "/api/{route}/{id}", "DownstreamPathTemplate": "/api/{route}/{id}",
"DownstreamScheme": "http", "DownstreamScheme": "https",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 7120
} }
], ],
"UpstreamPathTemplate": "/api/{route}{id}", "UpstreamPathTemplate": "/api/{route}{id}",
"UpstreamHttpMethod": [ "UpstreamhttpsMethod": [
"Get", "Get",
"Delete" "Delete"
] ]

View File

@@ -1,19 +1,5 @@
{ {
"Routes": [ "Routes": [
{
"DownstreamPathTemplate": "/swagger/{route}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 9090
}
],
"UpstreamPathTemplate": "/swagger/auth/{route}",
"UpstreamHttpMethod": [
"Get"
]
},
{ {
"DownstreamPathTemplate": "/swagger/{route}", "DownstreamPathTemplate": "/swagger/{route}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
@@ -29,22 +15,33 @@
] ]
}, },
{ {
"DownstreamPathTemplate": "/api/Auth/{route}", "DownstreamPathTemplate": "/swagger/{route}",
"DownstreamScheme": "http", "DownstreamScheme": "http",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 8088 "Port": 9090
} }
], ],
"UpstreamPathTemplate": "/api/Auth/{route}", "UpstreamPathTemplate": "/swagger/auth/{route}",
"UpstreamHttpMethod": [ "UpstreamHttpMethod": [
"Get", "Get"
"Post"
] ]
}, },
{ {
"DownstreamPathTemplate": "/api/Auth/login/{id}", "DownstreamPathTemplate": "/api/Auth/work-flow?cookie=false",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 9090
}
],
"UpstreamPathTemplate": "/api/Auth",
"UpstreamHttpMethod": [ "Post" ]
},
{
"DownstreamPathTemplate": "/api/Auth/check",
"DownstreamScheme": "http", "DownstreamScheme": "http",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
@@ -52,10 +49,8 @@
"Port": 8088 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/api/Auth/login/{id}", "UpstreamPathTemplate": "/api/Auth/check",
"UpstreamHttpMethod": [ "UpstreamHttpMethod": [ "Post" ]
"Post"
]
}, },
{ {
"DownstreamPathTemplate": "/api/{route}", "DownstreamPathTemplate": "/api/{route}",
@@ -91,6 +86,6 @@
} }
], ],
"GlobalConfiguration": { "GlobalConfiguration": {
"BaseUrl": "https://localhost:7052" "BaseUrl": "https://localhost:8443"
} }
} }