fix(relup): fix badfun after relup

This commit is contained in:
Turtle 2021-08-05 13:48:36 +08:00 committed by turtleDeng
parent efa71d12fe
commit 992e094ce9
3 changed files with 15 additions and 7 deletions

View File

@ -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]},

View File

@ -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}
]},
{<<".*">>, []}
]

View File

@ -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