enforce ^~ location modifier when rewrite-target annotation is set

This commit is contained in:
Zenara Daley 2018-09-13 10:39:52 -04:00
parent aff61dc2dc
commit 0e6f0bb88d
3 changed files with 37 additions and 5 deletions

View file

@ -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)
}