From a9695e969e2bf25f4ffb6f2700c33a470bb4c3fb Mon Sep 17 00:00:00 2001 From: Toby Chui Date: Tue, 30 Apr 2024 13:25:26 +0800 Subject: [PATCH] Update Server.go Fixed default site bypassing access filter bug --- src/mod/dynamicproxy/Server.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mod/dynamicproxy/Server.go b/src/mod/dynamicproxy/Server.go index 405d9a1..129192b 100644 --- a/src/mod/dynamicproxy/Server.go +++ b/src/mod/dynamicproxy/Server.go @@ -102,6 +102,13 @@ func (h *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { /* Root Router Handling */ + + //Root access control based on default rule + blocked := h.handleAccessRouting("default", w, r) + if blocked { + return + } + //Clean up the request URI proxyingPath := strings.TrimSpace(r.RequestURI) if !strings.HasSuffix(proxyingPath, "/") {