Skip to content

Commit

Permalink
Fix errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Jan 9, 2024
1 parent 0b2c7d7 commit fc1a38e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Microsoft.Extensions.Primitives;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using static Lombiq.HelpfulLibraries.AspNetCore.Security.ContentSecurityPolicyDirectives;
Expand Down Expand Up @@ -105,7 +106,6 @@ public static IApplicationBuilder UseNosniffContentTypeOptionsHeader(this IAppli
/// <summary>
/// Adds a middleware that checks all <c>Set-Cookie</c> headers and replaces any with a version containing
/// <c>Secure</c> and <c>SameSite=Strict</c> modifiers if they were missing.
/// cref="Cookie.Secure"/> and <see cref="Cookie."/>
/// </summary>
public static IApplicationBuilder UseStrictAndSecureCookies(this IApplicationBuilder app) =>
app.Use((context, next) =>
Expand All @@ -114,7 +114,7 @@ public static IApplicationBuilder UseStrictAndSecureCookies(this IApplicationBui
context.Response.OnStarting(() =>
{
var setCookie = context.Response.Headers[setCookieHeader];
if (!setCookie.Any()) return Task.CompletedTask;
if (!Enumerable.Any()) return Task.CompletedTask;

Check failure on line 117 in Lombiq.HelpfulLibraries.AspNetCore/Security/ApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / publish-nuget / publish-nuget

CS1501: No overload for method 'Any' takes 0 arguments [/home/runner/work/Helpful-Libraries/Helpful-Libraries/Lombiq.HelpfulLibraries.AspNetCore/Lombiq.HelpfulLibraries.AspNetCore.csproj]
var newCookies = new List<string>(capacity: setCookie.Count);
var changed = false;
Expand Down

0 comments on commit fc1a38e

Please sign in to comment.