Skip to content

Commit acd0d75

Browse files
author
Zachary Seguin
committed
fix: Strip /static prefix from static resources when sent to the filesystem
1 parent 6bed652 commit acd0d75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func main() {
247247
})
248248

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

252252
// Setup the server, with:
253253
// Add combined logging handler

0 commit comments

Comments
 (0)