Kaynağa Gözat

chore(dashboard): enable by default (#5926)

Zaiming (Stone) Shi 4 yıl önce
ebeveyn
işleme
c5b2bc86a2
1 değiştirilmiş dosya ile 4 ekleme ve 11 silme
  1. 4 11
      apps/emqx_dashboard/src/emqx_dashboard.erl

+ 4 - 11
apps/emqx_dashboard/src/emqx_dashboard.erl

@@ -47,17 +47,10 @@ start_listeners() ->
                     type => apiKey,
                     name => "authorization",
                     in => header}}}},
-    %% TODO: make it permanent when it's ready to release
-    Dispatch =
-        case os:getenv("_EMQX_ENABLE_DASHBOARD") of
-            V when V =:= "true" orelse V =:= "1" ->
-                [{"/", cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}},
-                 {"/static/[...]", cowboy_static, {priv_dir, emqx_dashboard, "www/static"}},
-                 {'_', cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}}
-                ];
-            _ ->
-                []
-        end,
+    Dispatch = [{"/", cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}},
+                {"/static/[...]", cowboy_static, {priv_dir, emqx_dashboard, "www/static"}},
+                {'_', cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}}
+               ],
     BaseMinirest = #{
         base_path => ?BASE_PATH,
         modules => minirest_api:find_api_modules(apps()),