Contratos y afiliados (nuevas rutas), ms prueba ping
This commit is contained in:
parent
f2efc96945
commit
da19375940
@ -29,9 +29,10 @@ var pipeConfig = new OcelotPipelineConfiguration
|
||||
AuthorizationMiddleware = async (downStreamContext, next) =>
|
||||
{
|
||||
var _bearer_token = downStreamContext.Request.Headers[HeaderNames.Authorization].ToString();
|
||||
//string date = DateTime.Now.ToString();
|
||||
|
||||
logger.LogInformation("Bearer :");
|
||||
logger.LogInformation(_bearer_token);
|
||||
//logger.LogInformation("Bearer :");
|
||||
//logger.LogInformation(_bearer_token);
|
||||
|
||||
bool isAuthorized = CustomLogic.Authorize(downStreamContext);
|
||||
if (isAuthorized)
|
||||
|
@ -1,5 +1,17 @@
|
||||
{
|
||||
"SwaggerEndPoints": [
|
||||
{
|
||||
"Key": "MsPing",
|
||||
"TransformByOcelotConfig": true,
|
||||
"Config": [
|
||||
{
|
||||
"Name": "MsPing",
|
||||
"Version": "1.0",
|
||||
"Url": "http://localhost:8198/api/swagger/v1/swagger.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"Key": "ApiGetway",
|
||||
"TransformByOcelotConfig": false,
|
||||
|
@ -360,9 +360,166 @@
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"SwaggerKey": "Afiliados",
|
||||
"UpstreamPathTemplate": "/MotivosNovedades",
|
||||
"UpstreamHttpMethod": [ "Get" ],
|
||||
|
||||
"DownstreamPathTemplate": "/MotivosNovedades",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8145
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
}
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "Afiliados",
|
||||
"UpstreamPathTemplate": "/MotivosNovedades",
|
||||
"UpstreamHttpMethod": [ "POST" ],
|
||||
|
||||
"DownstreamPathTemplate": "/MotivosNovedades",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8145
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"SwaggerKey": "Afiliados",
|
||||
"UpstreamPathTemplate": "/Novedades",
|
||||
"UpstreamHttpMethod": [ "GET" ],
|
||||
|
||||
"DownstreamPathTemplate": "/Novedades",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8145
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"SwaggerKey": "Afiliados",
|
||||
"UpstreamPathTemplate": "/Novedades",
|
||||
"UpstreamHttpMethod": [ "POST" ],
|
||||
|
||||
"DownstreamPathTemplate": "/Novedades",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8145
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
}
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "Afiliados",
|
||||
"UpstreamPathTemplate": "/Novedades",
|
||||
"UpstreamHttpMethod": [ "PATCH" ],
|
||||
|
||||
"DownstreamPathTemplate": "/Novedades",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8145
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
}
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "Afiliados",
|
||||
"UpstreamPathTemplate": "/Novedades/EditarLeido",
|
||||
"UpstreamHttpMethod": [ "PATCH" ],
|
||||
|
||||
"DownstreamPathTemplate": "/Novedades/EditarLeido",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8145
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"SwaggerKey": "Afiliados",
|
||||
"UpstreamPathTemplate": "/TiposNovedades",
|
||||
"UpstreamHttpMethod": [ "GET" ],
|
||||
|
||||
"DownstreamPathTemplate": "/TiposNovedades",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8145
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"SwaggerKey": "Afiliados",
|
||||
"UpstreamPathTemplate": "/TiposMotivos",
|
||||
"UpstreamHttpMethod": [ "GET" ],
|
||||
|
||||
"DownstreamPathTemplate": "/TiposMotivos",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8145
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
}
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "Afiliados",
|
||||
"UpstreamPathTemplate": "/TiposMotivos",
|
||||
"UpstreamHttpMethod": [ "Post" ],
|
||||
|
||||
"DownstreamPathTemplate": "/TiposMotivos",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8145
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
|
@ -180,6 +180,24 @@
|
||||
"GET"
|
||||
]
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "MsContratos",
|
||||
"UpstreamPathTemplate": "/CapCTTPorCTT/FechaBloqueo",
|
||||
"DownstreamPathTemplate": "/CapCTTPorCTT/FechaBloqueo",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8149
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
},
|
||||
"UpstreamHttpMethod": [
|
||||
"GET"
|
||||
]
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "MsContratos",
|
||||
"UpstreamPathTemplate": "/CapCTTPorCTT",
|
||||
@ -396,6 +414,24 @@
|
||||
"PATCH"
|
||||
]
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "MsContratos",
|
||||
"UpstreamPathTemplate": "/Convenios",
|
||||
"DownstreamPathTemplate": "/Convenios",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8149
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
},
|
||||
"UpstreamHttpMethod": [
|
||||
"PATCH"
|
||||
]
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "MsContratos",
|
||||
"UpstreamPathTemplate": "/Convenios",
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"GlobalConfiguration": {
|
||||
//"BaseUrl": "https://localhost:8021",
|
||||
"RateLimitOptions": {
|
||||
"QuotaExceededMessage": "Request excedidos",
|
||||
"HttpStatusCode": 909 //429 default
|
||||
}
|
||||
//"RateLimitOptions": {
|
||||
// "QuotaExceededMessage": "Request excedidos",
|
||||
// "HttpStatusCode": 909 //429 default
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
24
ApiGateway/Routes/ocelot.ping.json
Normal file
24
ApiGateway/Routes/ocelot.ping.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"Routes": [
|
||||
|
||||
{
|
||||
"SwaggerKey": "MsPing",
|
||||
|
||||
"UpstreamPathTemplate": "/Ping",
|
||||
"UpstreamHttpMethod": [ "GET", "POST", "PATCH" ],
|
||||
|
||||
"DownstreamPathTemplate": "/Ping",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8198
|
||||
}
|
||||
],
|
||||
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -2,6 +2,8 @@
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user