Skip to content

Commit

Permalink
fixes go-chi#343, add documentation to note StripSlashes incompat wit…
Browse files Browse the repository at this point in the history
…h http.FileServer
  • Loading branch information
pkieltyka committed Jan 9, 2019
1 parent fc00435 commit adf3c28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions middleware/strip.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import (
// StripSlashes is a middleware that will match request paths with a trailing
// slash, strip it from the path and continue routing through the mux, if a route
// matches, then it will serve the handler.
//
// NOTE: StripSlashes middleware is *incompatible* with http.FileServer,
// see https://github.com/go-chi/chi/issues/343
func StripSlashes(next http.Handler) http.Handler {
fn := func(w http.ResponseWriter, r *http.Request) {
var path string
Expand Down

0 comments on commit adf3c28

Please sign in to comment.