From 66442c420bc6f677201942229cee5b2422467c79 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Tue, 5 May 2026 19:41:51 +0200 Subject: [PATCH] files index fix --- apps/api/app/controllers/files_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/api/app/controllers/files_controller.rb b/apps/api/app/controllers/files_controller.rb index f5b8177..5c75c98 100644 --- a/apps/api/app/controllers/files_controller.rb +++ b/apps/api/app/controllers/files_controller.rb @@ -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"