You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This incorrect behavior does NOT happen with non-parameterized routes like /home. In this case the style sheet in /public/css/bulma.min.css is served properly.
Using a prefix for static does NOT solve the problem. Neither does a trailing / or .
fiberServ.Static("/public", "./public")
fiberServ.Static("/public/", "./public")
fiberServ.Static("/", "./public")
Expected Behavior
So-called regular, with params, routes should not alter static route.
Fiber Version
ithub.com/gofiber/fiber/v2 v2.52.5
Code Snippet (optional)
package main
import"github.com/gofiber/fiber/v3"import"log"funcmain() {
app:=fiber.New()
// Steps to reproducelog.Fatal(app.Listen(":3000"))
}
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
Bug Description
Route with parameter impacting static routes with parameters.
How to Reproduce
Steps to reproduce the behavior:
Server with the following routes
fiberServ.Static("/", "./public")
fiberServ.Get("/entity/:uid", app.EntityHandler)
fiberServ.Get("/home", app.HomeHandler)
Accessing route /entity/123456789 breaks static routes, adding /entity/ to the static paths.
[Error] Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:8000/**entity**/css/bulma.min.css
This incorrect behavior does NOT happen with non-parameterized routes like /home. In this case the style sheet in /public/css/bulma.min.css is served properly.
Using a prefix for static does NOT solve the problem. Neither does a trailing / or .
fiberServ.Static("/public", "./public")
fiberServ.Static("/public/", "./public")
fiberServ.Static("/", "./public")
Expected Behavior
So-called regular, with params, routes should not alter static route.
Fiber Version
ithub.com/gofiber/fiber/v2 v2.52.5
Code Snippet (optional)
Checklist:
The text was updated successfully, but these errors were encountered: