Skip to content

Commit

Permalink
fix: support new static file
Browse files Browse the repository at this point in the history
  • Loading branch information
710leo committed Sep 2, 2021
1 parent bd84c43 commit 86b2dcd
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions http/http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,7 @@ func configNoRoute(r *gin.Engine) {
arr := strings.Split(c.Request.URL.Path, ".")
suffix := arr[len(arr)-1]
switch suffix {
case "png":
fallthrough
case "jpeg":
fallthrough
case "jpg":
fallthrough
case "gif":
fallthrough
case "css":
fallthrough
case "js":
fallthrough
case "html":
fallthrough
case "htm":
case "png", "jpeg", "jpg", "svg", "ico", "gif", "css", "js", "html", "htm", "gz", "map":
c.File(path.Join(strings.Split("pub/"+c.Request.URL.Path, "/")...))
default:
c.File(path.Join("pub", "index.html"))
Expand Down

0 comments on commit 86b2dcd

Please sign in to comment.