fixed endpoint matching when indexing directory

This commit is contained in:
Yessiest 2023-05-05 00:28:34 +04:00
parent bab57b00bf
commit f1f13faddf
1 changed files with 2 additions and 3 deletions

View File

@ -175,7 +175,7 @@ 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)
match_path = _normalize_input(path).match(@path)
return (match_path.post_match == "")
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