mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 00:18:39 +00:00
NET 7.0 support (#581)
* NET 7.0 support * Bump Pomelo MySql to support EF7 * Its net7.0 time * Trying to resolve dependencies by hand * Fix .NET 7 warnings * Bump InfluxDB version * Fix bad null handling
This commit is contained in:
parent
fe0b0726b5
commit
d16132f67f
22 changed files with 48 additions and 44 deletions
|
@ -32,7 +32,7 @@ public class DigestMiddleware : Middleware
|
|||
public override async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
// Client digest check.
|
||||
if (!context.Request.Cookies.TryGetValue("MM_AUTH", out string? authCookie) || authCookie == null)
|
||||
if (!context.Request.Cookies.TryGetValue("MM_AUTH", out string? authCookie))
|
||||
authCookie = string.Empty;
|
||||
string digestPath = context.Request.Path;
|
||||
#if !DEBUG
|
||||
|
@ -120,7 +120,7 @@ public class DigestMiddleware : Middleware
|
|||
context.Response.Headers.Add("X-Digest-A", serverDigest);
|
||||
}
|
||||
|
||||
if (responseBuffer.Length > 1000 && context.Request.Headers.AcceptEncoding.Contains("deflate") && context.Response.ContentType.Contains("text/xml"))
|
||||
if (responseBuffer.Length > 1000 && context.Request.Headers.AcceptEncoding.Contains("deflate") && (context.Response.ContentType ?? string.Empty).Contains("text/xml"))
|
||||
{
|
||||
context.Response.Headers.Add("X-Original-Content-Length", responseBuffer.Length.ToString());
|
||||
context.Response.Headers.Add("Vary", "Accept-Encoding");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue