Merge branch 'V6' into OpenDream

This commit is contained in:
Jordan Dominion
2023-11-18 09:56:49 -05:00
6 changed files with 31 additions and 5 deletions
+1 -1
View File
@@ -387,7 +387,7 @@ System administrators will most likely have their own configuration plans, but h
Once complete, test that your configuration worked by visiting your proxy site from a browser on a different computer. You should receive a 401 Unauthorized response.
_NOTE: For SignalR to function properly, make sure your reverse proxy setup supports SSE (Server-Sent Events)_
_NOTE: Your reverse proxy setup may interfere with SSE (Server-Sent Events) which is used for real-time job updates. If you find this to be the case, please open an issue describing what you did to fix it as there may be a way for us to bypass the need for a workaround from our end._
#### IIS (Reccommended for Windows)
@@ -223,7 +223,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
else
Logger.LogTrace("Nothing to do as pendingSwappable is null.");
return MonitorAction.Continue;
return await base.HandleNormalReboot(cancellationToken);
}
/// <inheritdoc />
@@ -489,6 +489,9 @@ namespace Tgstation.Server.Host.Core
// Add the X-Powered-By response header
applicationBuilder.UseServerBranding(assemblyInformationProvider);
// Add the X-Accel-Buffering response header
applicationBuilder.UseDisabledNginxProxyBuffering();
// suppress OperationCancelledExceptions, they are just aborted HTTP requests
applicationBuilder.UseCancelledRequestSuppression();
@@ -155,10 +155,27 @@ namespace Tgstation.Server.Host.Extensions
ArgumentNullException.ThrowIfNull(applicationBuilder);
ArgumentNullException.ThrowIfNull(assemblyInformationProvider);
applicationBuilder.Use(async (context, next) =>
applicationBuilder.Use((context, next) =>
{
context.Response.Headers.Add("X-Powered-By", assemblyInformationProvider.VersionPrefix);
await next();
return next();
});
}
/// <summary>
/// Add the X-Accel-Buffering response header.
/// </summary>
/// <param name="applicationBuilder">The <see cref="IApplicationBuilder"/> to configure.</param>
/// <remarks>This is used to avoid interruption to SignalR streams by Nginx.</remarks>
public static void UseDisabledNginxProxyBuffering(this IApplicationBuilder applicationBuilder)
{
ArgumentNullException.ThrowIfNull(applicationBuilder);
// https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/#x-accel-buffering
applicationBuilder.Use((context, next) =>
{
context.Response.Headers.Add("X-Accel-Buffering", "no");
return next();
});
}
@@ -30,7 +30,7 @@ namespace Tgstation.Server.Tests.Live
&& !(logMessage.StartsWith("An exception occurred in the database while saving changes for context type") && (exception is OperationCanceledException || exception?.InnerException is OperationCanceledException)))
|| (logLevel == LogLevel.Critical && logMessage != "DropDatabase configuration option set! Dropping any existing database..."))
{
failureSink(new AssertFailedException("TGS logged an unexpected error!"));
failureSink(new AssertFailedException($"TGS ERR: {logMessage}"));
}
}
}
@@ -1322,6 +1322,12 @@ The user account that created this pull request is available to correct any issu
PrintChanges(newNotes, relevantChangelog);
}
if(component == Component.DreamMakerApi)
{
newNotes.AppendLine();
newNotes.AppendLine("#tgs-dmapi-release");
}
var markdown = newNotes.ToString();
return markdown;
}