From 621879edf52b8fd74e039eefe4e963e15a4ab8ea Mon Sep 17 00:00:00 2001 From: "Yang, Gao" Date: Fri, 23 Aug 2019 16:56:47 +0800 Subject: [PATCH] [Fix] parseWildcardRules remove the last non-asterisk character for pattern with asterisk character --- cors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cors.go b/cors.go index d6d06de..7c34ed8 100644 --- a/cors.go +++ b/cors.go @@ -135,7 +135,7 @@ func (c Config) parseWildcardRules() [][]string { continue } if i == (len(o) - 1) { - wRules = append(wRules, []string{o[:i-1], "*"}) + wRules = append(wRules, []string{o[:i], "*"}) continue }