1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

Changed all C# control flow block statements to include space between keyword and open paren

This commit is contained in:
Chad Scharf
2020-03-27 14:36:37 -04:00
parent 943aea9a12
commit 9800b752c0
243 changed files with 2258 additions and 2258 deletions

View File

@ -23,13 +23,13 @@ namespace Bit.Server
.ConfigureKestrel((context, options) => { });
var contentRoot = config.GetValue<string>("contentRoot");
if(string.IsNullOrWhiteSpace(contentRoot))
if (string.IsNullOrWhiteSpace(contentRoot))
{
builder.UseContentRoot(contentRoot);
}
var webRoot = config.GetValue<string>("webRoot");
if(string.IsNullOrWhiteSpace(webRoot))
if (string.IsNullOrWhiteSpace(webRoot))
{
builder.UseWebRoot(webRoot);
}

View File

@ -33,7 +33,7 @@ namespace Bit.Server
IApplicationBuilder app,
IConfiguration configuration)
{
if(configuration.GetValue<bool?>("serveUnknown") ?? false)
if (configuration.GetValue<bool?>("serveUnknown") ?? false)
{
app.UseStaticFiles(new StaticFileOptions
{
@ -47,7 +47,7 @@ namespace Bit.Server
async context => await context.Response.WriteAsync(System.DateTime.UtcNow.ToString()));
});
}
else if(configuration.GetValue<bool?>("webVault") ?? false)
else if (configuration.GetValue<bool?>("webVault") ?? false)
{
var options = new DefaultFilesOptions();
options.DefaultFileNames.Clear();
@ -57,18 +57,18 @@ namespace Bit.Server
{
OnPrepareResponse = ctx =>
{
if(!ctx.Context.Request.Path.HasValue ||
if (!ctx.Context.Request.Path.HasValue ||
ctx.Context.Response.Headers.ContainsKey("Cache-Control"))
{
return;
}
var path = ctx.Context.Request.Path.Value;
if(_longCachedPaths.Any(ext => path.StartsWith(ext)))
if (_longCachedPaths.Any(ext => path.StartsWith(ext)))
{
// 14 days
ctx.Context.Response.Headers.Append("Cache-Control", "max-age=1209600");
}
if(_mediumCachedPaths.Any(ext => path.StartsWith(ext)))
if (_mediumCachedPaths.Any(ext => path.StartsWith(ext)))
{
// 7 days
ctx.Context.Response.Headers.Append("Cache-Control", "max-age=604800");