fixed endpoint matching when indexing directory
This commit is contained in:
parent
bab57b00bf
commit
f1f13faddf
5
hyde.rb
5
hyde.rb
|
@ -175,8 +175,8 @@ module Hyde
|
||||||
def _match?(path, request)
|
def _match?(path, request)
|
||||||
# End node - nothing must be after it
|
# End node - nothing must be after it
|
||||||
if super(path,request) then
|
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 == "")
|
return (match_path.post_match == "")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -335,7 +335,6 @@ module Hyde
|
||||||
# do directory indexing
|
# do directory indexing
|
||||||
if cut_path.match /^\/?$/ then
|
if cut_path.match /^\/?$/ then
|
||||||
request.indexlist.each do |x|
|
request.indexlist.each do |x|
|
||||||
puts "Trying index #{x}"
|
|
||||||
try_index = @chain.find { |y| y._match? x, request }
|
try_index = @chain.find { |y| y._match? x, request }
|
||||||
if try_index then
|
if try_index then
|
||||||
request.path = x
|
request.path = x
|
||||||
|
|
Loading…
Reference in New Issue