Skip to content

Commit 10dee3e

Browse files
committed
ListPackages (default packages action) now responds to delete requests with a 405.
1 parent 1e6329b commit 10dee3e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/NuGetGallery/Controllers/PackagesController.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,10 @@ private static async Task<byte[]> ReadPackageFile(PackageArchiveReader packageAr
796796
}
797797
}
798798

799+
[HttpDelete]
800+
public HttpStatusCodeResult DisplayPackage() => new HttpStatusCodeResult(HttpStatusCode.MethodNotAllowed);
801+
802+
[HttpGet]
799803
public virtual async Task<ActionResult> DisplayPackage(string id, string version)
800804
{
801805
string normalized = NuGetVersionFormatter.Normalize(version);

0 commit comments

Comments
 (0)