feat: Ocelot-Konfigurationsdatei für die Entwicklung hinzugefügt.
This commit is contained in:
parent
0efb035d12
commit
6a536e950d
@ -4,7 +4,8 @@ using Ocelot.Middleware;
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Make sure to add the Ocelot configuration file
|
||||
builder.Configuration.AddJsonFile("ocelot.json");
|
||||
var suffix = builder.Environment.IsDevelopment() ? ".Development" : "";
|
||||
builder.Configuration.AddJsonFile($"ocelot{suffix}.json");
|
||||
|
||||
// Add Ocelot services
|
||||
builder.Services.AddOcelot();
|
||||
|
||||
96
ocelot.Development.json
Normal file
96
ocelot.Development.json
Normal file
@ -0,0 +1,96 @@
|
||||
{
|
||||
"Routes": [
|
||||
{
|
||||
"DownstreamPathTemplate": "/swagger/{route}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 9090
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/swagger/auth/{route}",
|
||||
"UpstreamHttpMethod": [
|
||||
"Get"
|
||||
]
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/swagger/{route}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8088
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/swagger/{route}",
|
||||
"UpstreamHttpMethod": [
|
||||
"Get"
|
||||
]
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/api/Auth/{route}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8088
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/api/Auth/{route}",
|
||||
"UpstreamHttpMethod": [
|
||||
"Get",
|
||||
"Post"
|
||||
]
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/api/Auth/login/{id}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8088
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/api/Auth/login/{id}",
|
||||
"UpstreamHttpMethod": [
|
||||
"Post"
|
||||
]
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/api/{route}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8088
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/api/{route}",
|
||||
"UpstreamHttpMethod": [
|
||||
"Get",
|
||||
"Post",
|
||||
"Put",
|
||||
"Delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"DownstreamPathTemplate": "/api/{route}/{id}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8088
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/api/{route}{id}",
|
||||
"UpstreamHttpMethod": [
|
||||
"Get",
|
||||
"Delete"
|
||||
]
|
||||
}
|
||||
],
|
||||
"GlobalConfiguration": {
|
||||
"BaseUrl": "https://localhost:7052"
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user