diff --git a/lib/archethic_web/controllers/api/web_hosting_controller/resources.ex b/lib/archethic_web/controllers/api/web_hosting_controller/resources.ex index 33716d0a2..d4f5ccd18 100644 --- a/lib/archethic_web/controllers/api/web_hosting_controller/resources.ex +++ b/lib/archethic_web/controllers/api/web_hosting_controller/resources.ex @@ -82,7 +82,15 @@ defmodule ArchethicWeb.API.WebHostingController.Resources do case Map.get(metadata, resource_path) do nil -> if is_a_directory?(metadata, resource_path) do - {:error, :is_a_directory} + index_path = resource_path <> "/index.html" + + case Map.get(metadata, index_path) do + nil -> + {:error, :is_a_directory} + + file -> + {:ok, file, MIME.from_path("index.html"), index_path} + end else # Handle JS History API by serving index.html instead of a 404 # We loose the ability to return real 404 errors diff --git a/src/c/nat/miniupnp b/src/c/nat/miniupnp index 72b33d714..99fc9941a 160000 --- a/src/c/nat/miniupnp +++ b/src/c/nat/miniupnp @@ -1 +1 @@ -Subproject commit 72b33d7145219e58c19dc5e8521a2e5c86c72cb9 +Subproject commit 99fc9941aa301323307a865f3798f64d189cc544