Skip to content

Commit

Permalink
Fix issue with API header binding when running under a subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel15 authored and pranavkm committed Apr 26, 2012
1 parent 0480e29 commit d9e86ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Website/Infrastructure/HttpHeaderValueProviderFactory.cs
Expand Up @@ -10,7 +10,7 @@ public override IValueProvider GetValueProvider(ControllerContext controllerCont
var request = controllerContext.RequestContext.HttpContext.Request;

// Use this value provider only if a route is located under "API"
if (request.Path.TrimStart('/').StartsWith("api", StringComparison.OrdinalIgnoreCase))
if (request.Path.Contains("/api/"))
return new HttpHeaderValueProvider(request, "ApiKey");
return null;
}
Expand Down

0 comments on commit d9e86ff

Please sign in to comment.