From 14d3fd7d0307e69c3c8995c42052b9103d1e2299 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 28 Nov 2019 21:11:45 -0700 Subject: http: path matcher supports exact matching with = prefix --- modules/caddyhttp/matchers_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'modules/caddyhttp/matchers_test.go') diff --git a/modules/caddyhttp/matchers_test.go b/modules/caddyhttp/matchers_test.go index 4569425..321d3ce 100644 --- a/modules/caddyhttp/matchers_test.go +++ b/modules/caddyhttp/matchers_test.go @@ -212,6 +212,21 @@ func TestPathMatcher(t *testing.T) { input: "/foo/bar/bam", expect: false, }, + { + match: MatchPath{"=/foo"}, + input: "/foo", + expect: true, + }, + { + match: MatchPath{"=/foo"}, + input: "/foo/bar", + expect: false, + }, + { + match: MatchPath{"=/foo"}, + input: "/FOO", + expect: true, + }, { match: MatchPath{"/foo"}, input: "/FOO", -- cgit v1.2.3