Skip to content
Browse files

Using ApiController as discriminator for HttpHeaderValueProviderFactory

  • Loading branch information...
1 parent 3d9c3e7 commit 72753c9fa2b44e6826b9ede0145500c81d301a19 @pranavkm pranavkm committed Apr 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Website/Infrastructure/HttpHeaderValueProviderFactory.cs
2 Website/Infrastructure/HttpHeaderValueProviderFactory.cs
@@ -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 (controllerContext.Controller is ApiController)
return new HttpHeaderValueProvider(request, "ApiKey");
return null;

0 comments on commit 72753c9

Please sign in to comment.
Something went wrong with that request. Please try again.