Explorar o código

fix: dashboard 404 conflict

DDDHuang %!s(int64=4) %!d(string=hai) anos
pai
achega
4b3b4dd54c
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      apps/emqx_dashboard/src/emqx_dashboard.erl

+ 2 - 1
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,