Fix auth enabled check
This commit is contained in:
parent
6717f1674f
commit
448e6787e2
|
|
@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
else
|
||||
{
|
||||
// Lightup a new ANCM variable that tells us if auth is enabled.
|
||||
foreach (var authType in iisAuth.Split(';'))
|
||||
foreach (var authType in iisAuth.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
if (!string.Equals(authType, "anonymous", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,11 +42,11 @@ namespace TestSites
|
|||
var authScheme = (await authProvider.GetAllSchemesAsync()).SingleOrDefault();
|
||||
if (string.IsNullOrEmpty(iisAuth))
|
||||
{
|
||||
await ctx.Response.WriteAsync("backcompat;" + authScheme?.Name ?? "null");
|
||||
await ctx.Response.WriteAsync("backcompat;" + (authScheme?.Name ?? "null"));
|
||||
}
|
||||
else
|
||||
{
|
||||
await ctx.Response.WriteAsync("latest;" + authScheme?.Name ?? "null");
|
||||
await ctx.Response.WriteAsync("latest;" + (authScheme?.Name ?? "null"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue