mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-06 22:40:31 -05:00
Package extension -> extensions
This commit is contained in:
parent
9a27beb79c
commit
cd0421ceb8
3 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ import (
|
||||||
"github.com/mholt/caddy/middleware"
|
"github.com/mholt/caddy/middleware"
|
||||||
"github.com/mholt/caddy/middleware/browse"
|
"github.com/mholt/caddy/middleware/browse"
|
||||||
"github.com/mholt/caddy/middleware/errors"
|
"github.com/mholt/caddy/middleware/errors"
|
||||||
"github.com/mholt/caddy/middleware/extension"
|
"github.com/mholt/caddy/middleware/extensions"
|
||||||
"github.com/mholt/caddy/middleware/fastcgi"
|
"github.com/mholt/caddy/middleware/fastcgi"
|
||||||
"github.com/mholt/caddy/middleware/gzip"
|
"github.com/mholt/caddy/middleware/gzip"
|
||||||
"github.com/mholt/caddy/middleware/headers"
|
"github.com/mholt/caddy/middleware/headers"
|
||||||
|
@ -43,7 +43,7 @@ func init() {
|
||||||
register("header", headers.New)
|
register("header", headers.New)
|
||||||
register("rewrite", rewrite.New)
|
register("rewrite", rewrite.New)
|
||||||
register("redir", redirect.New)
|
register("redir", redirect.New)
|
||||||
register("ext", extension.New)
|
register("ext", extensions.New)
|
||||||
register("proxy", proxy.New)
|
register("proxy", proxy.New)
|
||||||
register("fastcgi", fastcgi.New)
|
register("fastcgi", fastcgi.New)
|
||||||
register("websocket", websockets.New)
|
register("websocket", websockets.New)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// internally for paths requested that don't match an existing
|
// internally for paths requested that don't match an existing
|
||||||
// resource. The first path+ext combination that matches a valid
|
// resource. The first path+ext combination that matches a valid
|
||||||
// file will be used.
|
// file will be used.
|
||||||
package extension
|
package extensions
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
|
@ -7,7 +7,7 @@ type Path string
|
||||||
|
|
||||||
// Path matching will probably not always be a direct
|
// Path matching will probably not always be a direct
|
||||||
// comparison; this method assures that paths can be
|
// comparison; this method assures that paths can be
|
||||||
// easily matched.
|
// easily and consistently matched.
|
||||||
func (p Path) Matches(other string) bool {
|
func (p Path) Matches(other string) bool {
|
||||||
return strings.HasPrefix(string(p), other)
|
return strings.HasPrefix(string(p), other)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue