Incremental progress

This commit is contained in:
Ben 2025-07-27 16:20:52 -07:00
parent 9a7834c330
commit ab3b46713f
Signed by: webmaster
GPG key ID: A5FCBAF34E6E8B50
6 changed files with 99 additions and 22 deletions

View file

@ -13,16 +13,8 @@ func splitPath(path string) []string {
/* Attempts to match a request path to a set of whitelisted paths
@return false for anything other than a valid match */
func match(request string, matchTo []string) bool {
requestSplit := splitPath(request)
for _, matchToAttempt := range matchTo {
matchToAttemptSplit := splitPath(matchToAttempt);
if matchSegments(requestSplit, matchToAttemptSplit) {
return true;
}
}
return false;
func match(request string, matchTo string) bool {
return matchSegments(splitPath(request), splitPath(matchTo));
}
/* Returns false for anything other than a valid match */