Static
GO-S1036A directory listing is inappropriately exposed using
github.com/gofiber/fiber/v2
's Static
, yielding potentially sensitive
information to attackers.
package main
import (
"github.com/gofiber/fiber/v2"
)
func main() {
app := fiber.New()
app.Static("/static", "./static", fiber.Static{Browse: true})
}
package main
import (
"github.com/gofiber/fiber/v2"
)
func main() {
app := fiber.New()
app.Static("/static", "./static", fiber.Static{Browse: false})
}
or
package main
import (
"github.com/gofiber/fiber/v2"
)
func main() {
app := fiber.New()
app.Static("/static", "./static")
}