Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 static.go path wildcard support #71

Closed
zhongwei opened this issue Feb 7, 2020 · 3 comments
Closed

🐞 static.go path wildcard support #71

zhongwei opened this issue Feb 7, 2020 · 3 comments

Comments

@zhongwei
Copy link

zhongwei commented Feb 7, 2020

Fiber version/commit
v1.4.0
Issue description
static.go line 36 can't support "/static/*"
Expected behavior

Steps to reproduce

Code snippet
// Check if wildcard for single files
if prefix == "" || prefix == "/" {
wildcard = true
}

   // line 76
  //  if prefix is "/*"  and in windows then generate \*\xxx\a.js
package main

func main() {

}
@zhongwei zhongwei added the bug label Feb 7, 2020
@welcome
Copy link

welcome bot commented Feb 7, 2020

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template!

@koddr
Copy link
Contributor

koddr commented Feb 7, 2020

@zhongwei thx for reporting! 👍

Can you please send PR for fix this?

@Fenny
Copy link
Member

Fenny commented Feb 12, 2020

#121 fixed absolute paths on windows

app.Static("public")
// http://localhost:3000/index.html
// http://localhost:3000/style.css
// http://localhost:3000/main.js

app.Static("public/index.html")
// http://localhost:3000 => index.html

app.Static("*", "public/index.html")
// http://localhost:3000/john => index.html

// Wildcard paths work for single files now
app.Static("/ok*", "public/index.html")
// http://localhost:3000/ok/test => index.html

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants