feat(fs): Export, test and document OnlyFilesFS (#3939)
This commit is contained in:
committed by
GitHub
parent
b1c1e7b572
commit
8791c96960
+1
-1
@@ -218,7 +218,7 @@ func (group *RouterGroup) createStaticHandler(relativePath string, fs http.FileS
|
||||
fileServer := http.StripPrefix(absolutePath, http.FileServer(fs))
|
||||
|
||||
return func(c *Context) {
|
||||
if _, noListing := fs.(*onlyFilesFS); noListing {
|
||||
if _, noListing := fs.(*OnlyFilesFS); noListing {
|
||||
c.Writer.WriteHeader(http.StatusNotFound)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user