From 1796b67e7a0e515a1a0f8b523effe398363ebfb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20K=C3=B6ssler?= Date: Fri, 3 Jan 2025 14:04:32 +0100 Subject: [PATCH] Simplify segment loops --- lib/request-processor/utils/should_discover_route.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/request-processor/utils/should_discover_route.go b/lib/request-processor/utils/should_discover_route.go index 6cc67dbb..7b89de09 100644 --- a/lib/request-processor/utils/should_discover_route.go +++ b/lib/request-processor/utils/should_discover_route.go @@ -36,15 +36,11 @@ func ShouldDiscoverRoute(statusCode int, route, method string) bool { if isDotFile(segment) { return false } - } - for _, segment := range segments { if containsIgnoredString(segment) { return false } - } - - for _, segment := range segments { + if !isAllowedExtension(segment) { return false }