Skip to content

Commit 8c52395

Browse files
authored
Revert "when stat fails, server should return 404 (#95)" (#98)
This reverts commit b465eb5.
1 parent 470e7fb commit 8c52395

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

frontend/handler.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,13 @@ func staticMiddleware(root string) gin.HandlerFunc {
3535
return func(c *gin.Context) {
3636
_, err := fs.Stat(embeddedFiles, "dist"+c.Request.URL.Path)
3737
if err != nil {
38-
c.AbortWithStatus(http.StatusNotFound)
38+
c.Next()
3939
return
4040
}
41-
4241
fileServer.ServeHTTP(c.Writer, c.Request)
42+
4343
}
4444
}
45-
4645
func staticMiddlewareNoRoute(root string) gin.HandlerFunc {
4746
fileServer := http.FileServer(getFileSystem(root))
4847

0 commit comments

Comments
 (0)