Skip to content

Commit

Permalink
Merge pull request #60 from Lombiq/issue/LMBQ-174
Browse files Browse the repository at this point in the history
LMBQ-174: Fix HTTP 500 error in Lombiq.Privacy
  • Loading branch information
MZole authored May 24, 2023
2 parents 8d90a22 + 6bd523d commit 1a45556
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Lombiq.Privacy/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public override void ConfigureServices(IServiceCollection services)
private static Task<bool> IsConsentNeededAsync(HttpContext httpContext)
{
var consentService = httpContext.RequestServices.GetService<IPrivacyConsentService>();

if (consentService == null)
{
return Task.FromResult(true);
}

return consentService.IsConsentNeededAsync(httpContext);
}
}
Expand Down

0 comments on commit 1a45556

Please sign in to comment.