mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-21 20:13:22 +00:00
Update filesystem.go
This commit is contained in:
parent
1e171879d6
commit
58d657cb0a
@ -62,6 +62,9 @@ func New(config Config) fiber.Handler {
|
||||
if !strings.HasPrefix(cfg.Index, "/") {
|
||||
cfg.Index = "/" + cfg.Index
|
||||
}
|
||||
if cfg.NotFoundFile != "" && !strings.HasPrefix(cfg.NotFoundFile, "/") {
|
||||
cfg.NotFoundFile = "/" + cfg.NotFoundFile
|
||||
}
|
||||
if cfg.Root == nil {
|
||||
log.Fatal("filesystem: Root cannot be nil")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user