public static bool IsMatchRegistrationsBaseUrl( this INugetServerProvider provider, HttpContext context) { if (!provider.IsMatchVerbs(context, HttpMethods.IsHead, HttpMethods.IsGet)) { return(false); } return(provider.IsMatchResources( context, NugetServerResourceType.RegistrationsBaseUrl, NugetServerResourceType.RegistrationsBaseUrl_3_0_0_beta, NugetServerResourceType.RegistrationsBaseUrl_3_0_0_rc /* * Gzip does NOT work. */ //, //NugetServerResourceType.RegistrationsBaseUrl_3_4_0, //NugetServerResourceType.RegistrationsBaseUrl_3_6_0 ) && provider.IsMatchExtensionName(context, ".json")); }
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")); }