mirror of
https://github.com/bitwarden/server.git
synced 2025-04-25 06:42:22 -05:00
Clean up remove-server-version-header feature flag (#5573)
* Removed feature flag. * Linting.
This commit is contained in:
parent
6e81cee221
commit
c154b6ad9b
@ -163,7 +163,6 @@ public static class FeatureFlagKeys
|
|||||||
public const string EnableNewCardCombinedExpiryAutofill = "enable-new-card-combined-expiry-autofill";
|
public const string EnableNewCardCombinedExpiryAutofill = "enable-new-card-combined-expiry-autofill";
|
||||||
public const string StorageReseedRefactor = "storage-reseed-refactor";
|
public const string StorageReseedRefactor = "storage-reseed-refactor";
|
||||||
public const string TrialPayment = "PM-8163-trial-payment";
|
public const string TrialPayment = "PM-8163-trial-payment";
|
||||||
public const string RemoveServerVersionHeader = "remove-server-version-header";
|
|
||||||
public const string GeneratorToolsModernization = "generator-tools-modernization";
|
public const string GeneratorToolsModernization = "generator-tools-modernization";
|
||||||
public const string NewDeviceVerification = "new-device-verification";
|
public const string NewDeviceVerification = "new-device-verification";
|
||||||
public const string MacOsNativeCredentialSync = "macos-native-credential-sync";
|
public const string MacOsNativeCredentialSync = "macos-native-credential-sync";
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using Bit.Core;
|
|
||||||
using Bit.Core.Services;
|
using Bit.Core.Services;
|
||||||
using Bit.Core.Settings;
|
using Bit.Core.Settings;
|
||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
@ -25,15 +24,6 @@ public sealed class RequestLoggingMiddleware
|
|||||||
|
|
||||||
public Task Invoke(HttpContext context, IFeatureService featureService)
|
public Task Invoke(HttpContext context, IFeatureService featureService)
|
||||||
{
|
{
|
||||||
if (!featureService.IsEnabled(FeatureFlagKeys.RemoveServerVersionHeader))
|
|
||||||
{
|
|
||||||
context.Response.OnStarting(() =>
|
|
||||||
{
|
|
||||||
context.Response.Headers.Append("Server-Version", AssemblyHelpers.GetVersion());
|
|
||||||
return Task.CompletedTask;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
using (_logger.BeginScope(
|
using (_logger.BeginScope(
|
||||||
new RequestLogScope(context.GetIpAddress(_globalSettings),
|
new RequestLogScope(context.GetIpAddress(_globalSettings),
|
||||||
GetHeaderValue(context, "user-agent"),
|
GetHeaderValue(context, "user-agent"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user