Add SkipClean option
By default paths are run through the cleanPath method which prevents using fancier paths like /fetch/http://xkcd.com/534 This adds a SkipClean option so that this path isn't redirected to /fetch/http/xkcd.com/534
This commit is contained in:
committed by
Jingwen Owen Ou
parent
147a95f5e3
commit
8ac5cf967f
9
route.go
9
route.go
@@ -23,9 +23,12 @@ type Route struct {
|
||||
matchers []matcher
|
||||
// Manager for the variables from host and path.
|
||||
regexp *routeRegexpGroup
|
||||
// If true, when the path pattern is "/path/", accessing "/path" will
|
||||
// redirect to the former and vice versa.
|
||||
strictSlash bool
|
||||
// If true, when the path pattern is "/path/", accessing "/path" will
|
||||
// redirect to the former and vice versa.
|
||||
strictSlash bool
|
||||
// If true, when the path pattern is "/path//to", accessing "/path//to"
|
||||
// will not redirect
|
||||
skipClean bool
|
||||
// If true, this route never matches: it is only used to build URLs.
|
||||
buildOnly bool
|
||||
// The name used to build URLs.
|
||||
|
||||
Reference in New Issue
Block a user