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
nexedi
caddy
Commits
d0a51048
Commit
d0a51048
authored
May 24, 2015
by
Zac Bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lint warnings in middleware/rewrite
parent
506f1314
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
middleware/rewrite/rewrite.go
middleware/rewrite/rewrite.go
+3
-2
middleware/rewrite/rewrite_test.go
middleware/rewrite/rewrite_test.go
+2
-1
No files found.
middleware/rewrite/rewrite.go
View file @
d0a51048
...
...
@@ -6,12 +6,13 @@ import (
"net/http"
"fmt"
"github.com/mholt/caddy/middleware"
"net/url"
"path"
"path/filepath"
"regexp"
"strings"
"github.com/mholt/caddy/middleware"
)
// Rewrite is middleware to rewrite request locations internally before being handled.
...
...
@@ -96,7 +97,7 @@ func NewRegexpRule(base, pattern, to string, ext []string) (*RegexpRule, error)
}
// regexpVars are variables that can be used for To (rewrite destination path).
var
regexpVars
[]
string
=
[]
string
{
var
regexpVars
=
[]
string
{
"{path}"
,
"{query}"
,
"{file}"
,
...
...
middleware/rewrite/rewrite_test.go
View file @
d0a51048
...
...
@@ -6,8 +6,9 @@ import (
"net/http/httptest"
"testing"
"github.com/mholt/caddy/middleware"
"strings"
"github.com/mholt/caddy/middleware"
)
func
TestRewrite
(
t
*
testing
.
T
)
{
...
...
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