Fixed the api key being case sensative #2350

This commit is contained in:
Jamie Rees 2018-06-27 22:05:32 +01:00
commit 51475b05c0

View file

@ -28,7 +28,7 @@ namespace Ombi
if (context.Request.Path.StartsWithSegments(new PathString("/api")))
{
//Let's check if this is an API Call
if (context.Request.Headers.Keys.Contains("ApiKey"))
if (context.Request.Headers.Keys.Contains("ApiKey", StringComparer.InvariantCultureIgnoreCase))
{
// validate the supplied API key
// Validate it