Skip to content

Commit

Permalink
fix: Strip /static prefix from static resources when sent to the file…
Browse files Browse the repository at this point in the history
…system
  • Loading branch information
Zachary Seguin committed Feb 17, 2022
1 parent 6bed652 commit acd0d75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func main() {
})

// Serve the rest of the routes from the static directory.
router.PathPrefix("/static/").Handler(http.FileServer(http.Dir(staticDirectory)))
router.PathPrefix("/static/").Handler(http.StripPrefix("/static", http.FileServer(http.Dir(staticDirectory))))

// Setup the server, with:
// Add combined logging handler
Expand Down

0 comments on commit acd0d75

Please sign in to comment.