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) =>
|
AuthorizationMiddleware = async (downStreamContext, next) =>
|
||||||
{
|
{
|
||||||
var _bearer_token = downStreamContext.Request.Headers[HeaderNames.Authorization].ToString();
|
var _bearer_token = downStreamContext.Request.Headers[HeaderNames.Authorization].ToString();
|
||||||
|
//string date = DateTime.Now.ToString();
|
||||||
|
|
||||||
logger.LogInformation("Bearer :");
|
//logger.LogInformation("Bearer :");
|
||||||
logger.LogInformation(_bearer_token);
|
//logger.LogInformation(_bearer_token);
|
||||||
|
|
||||||
bool isAuthorized = CustomLogic.Authorize(downStreamContext);
|
bool isAuthorized = CustomLogic.Authorize(downStreamContext);
|
||||||
if (isAuthorized)
|
if (isAuthorized)
|
||||||
|
@ -1,5 +1,17 @@
|
|||||||
{
|
{
|
||||||
"SwaggerEndPoints": [
|
"SwaggerEndPoints": [
|
||||||
|
{
|
||||||
|
"Key": "MsPing",
|
||||||
|
"TransformByOcelotConfig": true,
|
||||||
|
"Config": [
|
||||||
|
{
|
||||||
|
"Name": "MsPing",
|
||||||
|
"Version": "1.0",
|
||||||
|
"Url": "http://localhost:8198/api/swagger/v1/swagger.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"Key": "ApiGetway",
|
"Key": "ApiGetway",
|
||||||
"TransformByOcelotConfig": false,
|
"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"
|
"GET"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"SwaggerKey": "MsContratos",
|
||||||
|
"UpstreamPathTemplate": "/CapCTTPorCTT/FechaBloqueo",
|
||||||
|
"DownstreamPathTemplate": "/CapCTTPorCTT/FechaBloqueo",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 8149
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"RouteClaimsRequirement": {
|
||||||
|
"permisos": "any"
|
||||||
|
},
|
||||||
|
"UpstreamHttpMethod": [
|
||||||
|
"GET"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"SwaggerKey": "MsContratos",
|
"SwaggerKey": "MsContratos",
|
||||||
"UpstreamPathTemplate": "/CapCTTPorCTT",
|
"UpstreamPathTemplate": "/CapCTTPorCTT",
|
||||||
@ -396,6 +414,24 @@
|
|||||||
"PATCH"
|
"PATCH"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"SwaggerKey": "MsContratos",
|
||||||
|
"UpstreamPathTemplate": "/Convenios",
|
||||||
|
"DownstreamPathTemplate": "/Convenios",
|
||||||
|
"DownstreamScheme": "http",
|
||||||
|
"DownstreamHostAndPorts": [
|
||||||
|
{
|
||||||
|
"Host": "localhost",
|
||||||
|
"Port": 8149
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"RouteClaimsRequirement": {
|
||||||
|
"permisos": "any"
|
||||||
|
},
|
||||||
|
"UpstreamHttpMethod": [
|
||||||
|
"PATCH"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"SwaggerKey": "MsContratos",
|
"SwaggerKey": "MsContratos",
|
||||||
"UpstreamPathTemplate": "/Convenios",
|
"UpstreamPathTemplate": "/Convenios",
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"GlobalConfiguration": {
|
"GlobalConfiguration": {
|
||||||
//"BaseUrl": "https://localhost:8021",
|
//"BaseUrl": "https://localhost:8021",
|
||||||
"RateLimitOptions": {
|
//"RateLimitOptions": {
|
||||||
"QuotaExceededMessage": "Request excedidos",
|
// "QuotaExceededMessage": "Request excedidos",
|
||||||
"HttpStatusCode": 909 //429 default
|
// "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": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
|
"System": "Information",
|
||||||
|
"Microsoft": "Information",
|
||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user