From cc40dfda849001589c6e8e22ff3eadcd14d87a6e Mon Sep 17 00:00:00 2001 From: Kollin Date: Mon, 7 Sep 2020 11:28:26 +0800 Subject: [PATCH] fixed url --- cam.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cam.go b/cam.go index 54b789c..957024c 100644 --- a/cam.go +++ b/cam.go @@ -91,7 +91,8 @@ func (Cam) splitPrefix(data string) []string { func (c Cam) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error { // make sure the url filter - url := r.URL.String() + url := r.URL.Path + if include(url, c.AllowURL) { return next.ServeHTTP(w, r) }