aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/rewrite/rewrite_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/rewrite/rewrite_test.go')
-rw-r--r--modules/caddyhttp/rewrite/rewrite_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/caddyhttp/rewrite/rewrite_test.go b/modules/caddyhttp/rewrite/rewrite_test.go
index aaa142bc2..81360baee 100644
--- a/modules/caddyhttp/rewrite/rewrite_test.go
+++ b/modules/caddyhttp/rewrite/rewrite_test.go
@@ -236,6 +236,11 @@ func TestRewrite(t *testing.T) {
expect: newRequest(t, "GET", "/foo/bar"),
},
{
+ rule: Rewrite{StripPathPrefix: "prefix"},
+ input: newRequest(t, "GET", "/prefix/foo/bar"),
+ expect: newRequest(t, "GET", "/foo/bar"),
+ },
+ {
rule: Rewrite{StripPathPrefix: "/prefix"},
input: newRequest(t, "GET", "/prefix"),
expect: newRequest(t, "GET", ""),