From 4b3b4dd54ca2f0c8cf4eea1b84d7cf6e691db9be Mon Sep 17 00:00:00 2001 From: DDDHuang <904897578@qq.com> Date: Fri, 13 Aug 2021 16:38:33 +0800 Subject: [PATCH] fix: dashboard 404 conflict --- apps/emqx_dashboard/src/emqx_dashboard.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/emqx_dashboard/src/emqx_dashboard.erl b/apps/emqx_dashboard/src/emqx_dashboard.erl index fb4a88066..adbdbc8e7 100644 --- a/apps/emqx_dashboard/src/emqx_dashboard.erl +++ b/apps/emqx_dashboard/src/emqx_dashboard.erl @@ -57,7 +57,8 @@ start_listener({Proto, Port, Options}) -> name => "authorization", in => header}}}}, Dispatch = [{"/", cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}}, - {"/static/[...]", cowboy_static, {priv_dir, emqx_dashboard, "www/static"}}], + {"/static/[...]", cowboy_static, {priv_dir, emqx_dashboard, "www/static"}}, + {'_', cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}}], Minirest = #{ protocol => Proto, base_path => ?BASE_PATH,