This commit is contained in:
2018-11-06 23:54:47 +00:00
parent 3c0f696c68
commit dadeb45342
5 changed files with 173 additions and 97 deletions

View File

@@ -130,6 +130,18 @@ namespace AyaNova
});
// Add service and create Policy with options
_log.LogDebug("BOOT: init CORS service");
services.AddCors(options =>
{
options.AddPolicy("CorsPolicy",
builder => builder.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());
});
_log.LogDebug("BOOT: init MVC service");
_log.LogDebug("BOOT: init Metrics service");
@@ -240,7 +252,7 @@ namespace AyaNova
// Token will only be valid if not expired yet, with 5 minutes clock skew.
ValidateLifetime = true,
RequireExpirationTime = true,
RequireExpirationTime = true,
ClockSkew = new TimeSpan(0, 5, 0),
};
});
@@ -357,6 +369,8 @@ namespace AyaNova
#endregion
_log.LogDebug("BOOT: pipeline - CORS");
app.UseCors("CorsPolicy");
//USE MVC
_log.LogDebug("BOOT: pipeline - MVC");