feat: support byte range

This commit is contained in:
Yiyang Kang 2023-04-12 02:22:32 +08:00
parent 6555cdb23a
commit 6c7774159f
1 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,10 @@ func serve(port int) (*fiber.App, <-chan error) {
RequestMethods: []string{"GET", "HEAD"}, RequestMethods: []string{"GET", "HEAD"},
ServerHeader: "StaticFileServer", ServerHeader: "StaticFileServer",
}) })
app.Static("/", "./", fiber.Static{Browse: true}) app.Static("/", "./", fiber.Static{
Browse: true,
ByteRange: true,
})
go func() { go func() {
defer close(ch) defer close(ch)