feat(gateway): Unterstützung für 3-stufig verschachtelte API-Routen hinzugefügt
- Routenzuordnung für /api/{route1}/{route2}/{route3} hinzugefügt
- Ermöglicht Downstream-Routing zur Unterstützung komplexerer API-Strukturen
This commit is contained in:
@@ -98,6 +98,23 @@
|
|||||||
"Delete"
|
"Delete"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"DownstreamPathTemplate": "/api/{route1}/{route2}/{route3}",
|
||||||
|
"DownstreamScheme": "https",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 7103
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"UpstreamPathTemplate": "/api/{route1}/{route2}/{route3}",
|
||||||
|
"UpstreamhttpsMethod": [
|
||||||
|
"Get",
|
||||||
|
"Post",
|
||||||
|
"Put",
|
||||||
|
"Delete"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"DownstreamPathTemplate": "/",
|
"DownstreamPathTemplate": "/",
|
||||||
"DownstreamScheme": "http",
|
"DownstreamScheme": "http",
|
||||||
|
|||||||
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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user