enforce ^~ location modifier when rewrite-target annotation is set
This commit is contained in:
parent
aff61dc2dc
commit
0e6f0bb88d
3 changed files with 37 additions and 5 deletions
|
|
@ -382,7 +382,7 @@ func TestBuildLocation(t *testing.T) {
|
|||
Rewrite: rewrite.Config{Target: tc.Target, AddBaseURL: tc.AddBaseURL},
|
||||
}
|
||||
|
||||
newLoc := buildLocation(loc)
|
||||
newLoc := buildLocation(loc, tc.Path != tc.Target)
|
||||
if tc.Location != newLoc {
|
||||
t.Errorf("%s: expected '%v' but returned %v", k, tc.Location, newLoc)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue