فهرست منبع

fix(relup): fix badfun after relup

Turtle 4 سال پیش
والد
کامیت
992e094ce9

+ 1 - 1
apps/emqx_management/src/emqx_management.app.src

@@ -1,6 +1,6 @@
 {application, emqx_management,
  [{description, "EMQ X Management API and CLI"},
-  {vsn, "4.3.4"}, % strict semver, bump manually!
+  {vsn, "4.3.5"}, % strict semver, bump manually!
   {modules, []},
   {registered, [emqx_management_sup]},
   {applications, [kernel,stdlib,minirest]},

+ 8 - 4
apps/emqx_management/src/emqx_management.appup.src

@@ -1,12 +1,16 @@
 %% -*- mode: erlang -*-
 {VSN,
- [ {<<"4.3.[0-3]">>,
-    [ {restart_application, emqx_management}
+ [ {<<"4.3.[0-4]">>,
+    [ {apply,{minirest,stop_http,['http:management']}},
+      {apply,{minirest,stop_http,['https:management']}},
+      {restart_application, emqx_management}
     ]},
    {<<".*">>, []}
  ],
- [ {<<"4.3.[0-3]">>,
-    [ {restart_application, emqx_management}
+ [ {<<"4.3.[0-4]">>,
+    [ {apply,{minirest,stop_http,['http:management']}},
+      {apply,{minirest,stop_http,['https:management']}},
+      {restart_application, emqx_management}
     ]},
    {<<".*">>, []}
  ]

+ 6 - 2
apps/emqx_management/src/emqx_mgmt_http.erl

@@ -25,6 +25,10 @@
 
 -export([init/2]).
 
+-export([ filter/1
+        , authorize_appid/1
+        ]).
+
 -include_lib("emqx/include/emqx.hrl").
 
 -define(APP, emqx_management).
@@ -87,8 +91,8 @@ http_handlers() ->
     Plugins = lists:map(fun(Plugin) -> Plugin#plugin.name end, emqx_plugins:list()),
     [{"/api/v4", minirest:handler(#{apps   => Plugins ++ [emqx_modules] -- ?EXCEPT_PLUGIN,
                                     except => ?EXCEPT,
-                                    filter => fun filter/1}),
-                 [{authorization, fun authorize_appid/1}]}].
+                                    filter => fun ?MODULE:filter/1}),
+                 [{authorization, fun ?MODULE:authorize_appid/1}]}].
 
 %%--------------------------------------------------------------------
 %% Handle 'status' request