mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-02 18:18:39 +00:00
Lots of bug fixes and performance improvements (#410)
* Many bug fixes and performance enhancements * Fix warnings and speed up photos with me * Finish refactoring user serialization * Finish refactoring user serialization Use GameTokens instead of User when possible Prevent negative page sizes * Fix debug compilation * Add gzip compression to example nginx config * Remove deflate changes * Add UsernameFromWebToken Co-authored-by: Jayden <jvyden@jvyden.xyz>
This commit is contained in:
parent
8dbd0e63ff
commit
d23a264b8a
43 changed files with 625 additions and 505 deletions
|
@ -1,10 +1,10 @@
|
|||
using System.IO.Compression;
|
||||
using LBPUnion.ProjectLighthouse.Configuration;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Logging;
|
||||
using LBPUnion.ProjectLighthouse.Middlewares;
|
||||
using LBPUnion.ProjectLighthouse.PlayerData;
|
||||
using LBPUnion.ProjectLighthouse.Serialization;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
|
||||
|
@ -124,6 +124,7 @@ public class GameServerStartup
|
|||
context.Response.Body = responseBuffer;
|
||||
|
||||
await next(context); // Handle the request so we can get the server digest hash
|
||||
responseBuffer.Position = 0;
|
||||
|
||||
// Compute the server digest hash.
|
||||
if (computeDigests)
|
||||
|
@ -139,10 +140,7 @@ public class GameServerStartup
|
|||
context.Response.Headers.Add("X-Digest-A", serverDigest);
|
||||
}
|
||||
|
||||
// Set the X-Original-Content-Length header to the length of the response buffer.
|
||||
context.Response.Headers.Add("X-Original-Content-Length", responseBuffer.Length.ToString());
|
||||
|
||||
// Copy the buffered response to the actual respose stream.
|
||||
// Copy the buffered response to the actual response stream.
|
||||
responseBuffer.Position = 0;
|
||||
await responseBuffer.CopyToAsync(oldResponseStream);
|
||||
context.Response.Body = oldResponseStream;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue