--- a/src/server/daemon/location.c Sun Dec 07 17:06:21 2025 +0100 +++ b/src/server/daemon/location.c Sun Dec 07 17:37:05 2025 +0100 @@ -224,7 +224,7 @@ } else if(loc->match == WS_LOCATION_MATCH_PREFIX) { return cx_strprefix(uri, loc->match_string); } else { - return regexec(&loc->regex, uri.ptr, 0, match, WS_LOCATION_NMATCH) == 0; + return regexec(&loc->regex, uri.ptr, WS_LOCATION_NMATCH, match, 0) == 0; } return 0; }