files index fix

This commit is contained in:
2026-05-05 19:41:51 +02:00
parent c8e7e9ffd5
commit 66442c420b
@@ -4,6 +4,9 @@ class FilesController < ApplicationController
full = base.join(params[:path])
return render plain: "Not Found", status: :not_found unless full.to_s.start_with?(base.to_s)
full = full.join("index.html") if full.exist? && full.directory?
return render plain: "Not Found", status: :not_found unless full.exist? && full.file?
send_file full.to_s, disposition: "inline"