fix: dashboard 404 conflict

This commit is contained in:
DDDHuang 2021-08-13 16:38:33 +08:00 committed by turtleDeng
parent 4bd2240c1a
commit 4b3b4dd54c
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@ start_listener({Proto, Port, Options}) ->
name => "authorization", name => "authorization",
in => header}}}}, in => header}}}},
Dispatch = [{"/", cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}}, 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 = #{ Minirest = #{
protocol => Proto, protocol => Proto,
base_path => ?BASE_PATH, base_path => ?BASE_PATH,