Exemplo n.º 1
0
        public static bool IsMatchServerIndex(
            this INugetServerProvider provider,
            HttpContext context)
        {
            if (!provider.IsMatchVerbs(context,
                                       HttpMethods.IsHead,
                                       HttpMethods.IsGet))
            {
                return(false);
            }

            return(provider.IsMatchPath(context,
                                        provider.GetServiceIndexUrlPath()) &&
                   provider
                   .IsMatchExtensionName(context, ".json"));
        }