From f1f13faddf0f4a454c0a13c28957e53146eb529c Mon Sep 17 00:00:00 2001 From: Yessiest Date: Fri, 5 May 2023 00:28:34 +0400 Subject: [PATCH] fixed endpoint matching when indexing directory --- hyde.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hyde.rb b/hyde.rb index aa088a6..691a569 100644 --- a/hyde.rb +++ b/hyde.rb @@ -175,8 +175,8 @@ module Hyde def _match?(path, request) # End node - nothing must be after it if super(path,request) then - match_path = _normalize_input(request.path).match(@path) - return (match_path.post_match == "") + match_path = _normalize_input(path).match(@path) + return (match_path.post_match == "") end end end @@ -335,7 +335,6 @@ module Hyde # do directory indexing if cut_path.match /^\/?$/ then request.indexlist.each do |x| - puts "Trying index #{x}" try_index = @chain.find { |y| y._match? x, request } if try_index then request.path = x