+ rutas HC para graficos (formulario)
This commit is contained in:
parent
2c997c8712
commit
e7bb41e42a
@ -15,6 +15,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="Routes\ocelot.apitest.json" />
|
||||
<Content Remove="Routes\ocelot.comitetc.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.Extensions.FileSystemGlobbing.Internal;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Ocelot.Configuration;
|
||||
using Ocelot.Middleware;
|
||||
using Security;
|
||||
@ -23,8 +24,8 @@ namespace ApiGateway
|
||||
//var route2 = ctx.Items.DownstreamRequest(); //Solo el path del request
|
||||
//var route3 = ctx.Items.DownstreamRoute(); //Datos full del request
|
||||
|
||||
//var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole().AddEventLog());
|
||||
//var logger = loggerFactory.CreateLogger("Auth");
|
||||
var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole().AddEventLog());
|
||||
var logger = loggerFactory.CreateLogger("Auth");
|
||||
|
||||
//TODO: ELIMINAR ESTAS RUTAS POR COMPLETO!
|
||||
// TknCambioClave
|
||||
@ -33,6 +34,7 @@ namespace ApiGateway
|
||||
|
||||
string calledUrl = ctx.Items.DownstreamRoute().UpstreamPathTemplate.OriginalValue;
|
||||
|
||||
logger.LogError(71, $"DownstreamRoute: {calledUrl}");
|
||||
// Excepcion para login, no requiere token
|
||||
if (
|
||||
String.Equals(calledUrl, "/ldap/Conectar") ||
|
||||
@ -41,9 +43,25 @@ namespace ApiGateway
|
||||
String.Equals(calledUrl, "/Auth/CambiarClave") ||
|
||||
String.Equals(calledUrl, "/Auth/TknCambioClave") ||
|
||||
String.Equals(calledUrl, "/Auth/Proveedor") ||
|
||||
String.Equals(calledUrl, "/Email")
|
||||
String.Equals(calledUrl, "/Email") ||
|
||||
String.Equals(calledUrl, "/Formularios/Graficas/{rutaGrafica}")
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Define the regular expression pattern
|
||||
//string patternGraficosHc = @"^\/Formularios\/Graficas\/[A-Za-z0-9]+\.[A-Za-z]+$";
|
||||
//Regex regex = new Regex(patternGraficosHc);
|
||||
//bool isMatch = regex.IsMatch(calledUrl);
|
||||
|
||||
|
||||
//logger.LogError(71, $"isMatch: {isMatch}");
|
||||
|
||||
//if (isMatch)
|
||||
//{
|
||||
// return true;
|
||||
//}
|
||||
|
||||
|
||||
try
|
||||
|
@ -198,6 +198,42 @@
|
||||
"POST"
|
||||
]
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "MsHistoriaClinica",
|
||||
"UpstreamPathTemplate": "/Formularios/Graficas",
|
||||
"DownstreamPathTemplate": "/Formularios/Graficas",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8154
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
},
|
||||
"UpstreamHttpMethod": [
|
||||
"GET"
|
||||
]
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "MsHistoriaClinica",
|
||||
"UpstreamPathTemplate": "/Formularios/Graficas/{rutaGrafica}",
|
||||
"DownstreamPathTemplate": "/Formularios/Graficas/{rutaGrafica}",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 8154
|
||||
}
|
||||
],
|
||||
"RouteClaimsRequirement": {
|
||||
"permisos": "any"
|
||||
},
|
||||
"UpstreamHttpMethod": [
|
||||
"GET"
|
||||
]
|
||||
},
|
||||
{
|
||||
"SwaggerKey": "MsHistoriaClinica",
|
||||
"UpstreamPathTemplate": "/GrupoEtPorRia",
|
||||
|
@ -1,24 +1,14 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:18821",
|
||||
"sslPort": 44327
|
||||
}
|
||||
},
|
||||
{
|
||||
"profiles": {
|
||||
"IntegradorBE": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7082;http://localhost:5082",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"MySecretKey": "_ll@v3Segur1d4d!123"
|
||||
}
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "https://localhost:7082;http://localhost:5082"
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
@ -28,5 +18,14 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:61372/",
|
||||
"sslPort": 44333
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user