Skip to content

Commit

Permalink
Add NuGet description
Browse files Browse the repository at this point in the history
  • Loading branch information
philo committed Sep 23, 2020
1 parent 16809e9 commit e5e359d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Storm.AzureFrontDoorFilter/AzureFrontDoorFilterMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ public async Task InvokeAsync(HttpContext context)
}
}

private static string GetHeaderValueOrDefault(IHeaderDictionary headers, string headerName, string defaultValue = default)
private static string? GetHeaderValueOrDefault(IHeaderDictionary headers, string headerName, string? defaultValue = default)
{
if (headerName is null)
{
throw new ArgumentNullException(nameof(headerName));
}

if (headers.TryGetValue(headerName, out var headerValue))
{
return headerValue;
Expand All @@ -77,8 +82,8 @@ private bool IsAzureFrontDoorRequest(HttpRequest request)
return true;
}

var afdId = GetHeaderValueOrDefault(request.Headers, AfdIdHeaderName);
return approvedAfdIds.Contains(afdId);
var afdId = GetHeaderValueOrDefault(request.Headers, AfdIdHeaderName, AllowAllValue);
return approvedAfdIds.Contains(afdId ?? AllowAllValue);
}
}
}
14 changes: 14 additions & 0 deletions src/Storm.AzureFrontDoorFilter/Storm.AzureFrontDoorFilter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8</LangVersion>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Authors>Phil Oyston, StormID</Authors>
<Company>Storm ID</Company>
<Description>Provides middleware to filter access to your web application based on the request originating through a specified set of Azure Front Door resources.</Description>
<PackageTags>azure front-door dotnet</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/stormid/storm-azurefrontdoorfilter</PackageProjectUrl>
</PropertyGroup>

<ItemGroup>
Expand All @@ -12,4 +19,11 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.8" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

</Project>

0 comments on commit e5e359d

Please sign in to comment.