mirror of
https://github.com/gin-gonic/gin.git
synced 2026-07-13 14:41:33 +08:00
Compare commits
2 Commits
b62951e2c2
...
3726784fce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3726784fce | ||
|
|
040a2c3e00 |
@ -224,7 +224,7 @@ func (group *RouterGroup) createStaticHandler(relativePath string, fs http.FileS
|
||||
|
||||
file := c.Param("filepath")
|
||||
// Check if file exists and/or if we have permission to access it
|
||||
f, err := fs.Open(file)
|
||||
f, err := fs.Open(path.Clean(file))
|
||||
if err != nil {
|
||||
c.Writer.WriteHeader(http.StatusNotFound)
|
||||
c.handlers = group.engine.noRoute
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user