public static void UseEnvCheck(this IApplicationBuilder app, string path = "/env")
 {
     app.Map(path, s =>
     {
         s.Run(async context =>
         {
             var env = AppEnvironment.GetAppEnvironment();
             context.Response.ContentType = DEFAULT_CONTENT_TYPE;
             await context.Response.WriteAsync(Serialize(env));
         });
     });
 }
 public static void UseEnvCheck(this IApplicationBuilder app, string path = "/env")
 {
     app.Map(path, s =>
     {
         s.Run(async context =>
         {
             var remoteIp = context.Connection.RemoteIpAddress;
             if (!IPAddress.IsLoopback(remoteIp))
             {
                 context.Response.StatusCode  = 403;
                 context.Response.ContentType = "application/html";
                 await context.Response.WriteAsync("<font size=\"7\">403</font><br/>");
             }
             else
             {
                 var env = AppEnvironment.GetAppEnvironment();
                 context.Response.ContentType = DEFAULT_CONTENT_TYPE;
                 await context.Response.WriteAsync(Serialize(env));
             }
         });
     });
 }