customer docs

This commit is contained in:
2022-03-31 22:35:14 +00:00
parent d86931b0ee
commit 1f3f52b41e
12 changed files with 57 additions and 4 deletions

View File

@@ -63,7 +63,7 @@ namespace AyaNova
{
options.RouteBasePath = "/profiler";
//in testing only ignorepaths was reliable and worked and docs say it prevents any profiling at all
options.IgnorePath("/auth").IgnorePath("/license").IgnorePath("/user").IgnorePath("/docs").IgnorePath("/custdocs");
options.IgnorePath("/auth").IgnorePath("/license").IgnorePath("/user").IgnorePath("/docs").IgnorePath("/cust");
options.ResultsAuthorize = request =>
{
if (request.HttpContext.Items["AY_PROFILER_ALLOWED"] != null)
@@ -644,7 +644,7 @@ namespace AyaNova
//to support html5 pushstate routing in spa
//this ensures that a refresh at the client will not 404 but rather force back to the index.html app page and then handled internally by the client
await next();
if (!context.Response.HasStarted && !context.Request.Path.Value.StartsWith("/api") && context.Request.Path.Value != "/docs" && context.Request.Path.Value != "/custdocs" && context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value))
if (!context.Response.HasStarted && !context.Request.Path.Value.StartsWith("/api") && context.Request.Path.Value != "/docs" && context.Request.Path.Value != "/cust" && context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value))
{
context.Request.Path = "/index.html";
context.Response.StatusCode = 200;