Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
caddy
Commits
cd0421ce
Commit
cd0421ce
authored
Apr 18, 2015
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Package extension -> extensions
parent
9a27beb7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
config/middleware.go
config/middleware.go
+2
-2
middleware/extensions/ext.go
middleware/extensions/ext.go
+1
-1
middleware/path.go
middleware/path.go
+1
-1
No files found.
config/middleware.go
View file @
cd0421ce
...
@@ -4,7 +4,7 @@ import (
...
@@ -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/extension
s
"
"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() {
...
@@ -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"
,
extension
s
.
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
)
...
...
middleware/extension/ext.go
→
middleware/extension
s
/ext.go
View file @
cd0421ce
...
@@ -3,7 +3,7 @@
...
@@ -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
extension
s
import
(
import
(
"net/http"
"net/http"
...
...
middleware/path.go
View file @
cd0421ce
...
@@ -7,7 +7,7 @@ type Path string
...
@@ -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
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment