-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add webvisor * remove ya metrica in dev env * disable calc button if there is only one person * remove unused code * add tests * #6 fix backend error * fix #6 * #10 add healthcheck * add production config, please close #10 * fix healtcheck * add serilog and sentry, #9, #8; webvison 2; * update release version for Sentry * update manifest.json for mobile version * close #9; close #8;
- Loading branch information
1 parent
c1c5efe
commit 93b9d29
Showing
10 changed files
with
102 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.Net.Http.Headers; | ||
|
||
namespace Izzy.Web.Middlewares | ||
{ | ||
public class HealthCheckMiddleware | ||
{ | ||
private const string _path = "/healthcheck"; | ||
private readonly RequestDelegate _next; | ||
|
||
public HealthCheckMiddleware(RequestDelegate next) | ||
{ | ||
_next = next; | ||
} | ||
|
||
public async Task Invoke(HttpContext context) | ||
{ | ||
if (!context.Request.Path.Equals(_path, StringComparison.OrdinalIgnoreCase)) | ||
{ | ||
await _next(context); | ||
} | ||
else | ||
{ | ||
context.Response.ContentType = "text/plain"; | ||
context.Response.StatusCode = 200; | ||
context.Response.Headers.Add(HeaderNames.Connection, "close"); | ||
await context.Response.WriteAsync("OK"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,9 @@ | |
"Default": "Warning" | ||
} | ||
}, | ||
"AllowedHosts": "*" | ||
"AllowedHosts": "*", | ||
"Sentry": { | ||
"Dsn": "https://[email protected]/1385588", | ||
"IncludeRequestPayload": true | ||
} | ||
} |