Skip to content

🐛 [Bug]: Static - browsing is broken for subfolders #3667

@Mopsgamer

Description

@Mopsgamer

Bug Description

While static files are served correctly and static root displays file tree view as expected, static subpaths are not displaying file trees - they are redirecting to invalid relative URLs.

How to Reproduce

Mopsgamer/gofiber-static-browse-repro - everything you need.

git clone https://github.com/Mopsgamer/gofiber-static-browse-repro.git
cd gofiber-static-browse-repro
go run app-repro.go
  1. Open localhost:3000/static.

  2. Click js. Expect seeing file tree with "index.js" file.

Expected Behavior

Clicking js on the /static page should open /static/js route, which shows "index.js".

Unfortunately, it redirects to /js/.

Fiber Version

v3.0.0-beta.5

Code Snippet (optional)

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my problem prior to opening this one.
  • I understand that improperly formatted bug reports may be closed without explanation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions