优化结构

This commit is contained in:
Yvan
2026-08-27 19:08:51 +08:00
parent 653414a1da
commit 5052835fcb
11 changed files with 197 additions and 19 deletions
@@ -28,3 +28,14 @@ func TestDefaultIgnoredAPIsDoNotHideAnnouncementDataSource(t *testing.T) {
}
}
}
func TestStaticFileAPIsAreIgnoredRegardlessOfConfiguredPrefix(t *testing.T) {
for _, method := range []string{"GET", "HEAD"} {
if !isStaticFileAPI(apiPO{Method: method, Path: "/files/*filepath"}) {
t.Fatalf("%s static route was not recognized", method)
}
}
if isStaticFileAPI(apiPO{Method: "POST", Path: "/files/*filepath"}) {
t.Fatal("non-read static route was incorrectly ignored")
}
}