diff --git a/CHANGES-4.3.md b/CHANGES-4.3.md index c6a6e9465..247e15dd7 100644 --- a/CHANGES-4.3.md +++ b/CHANGES-4.3.md @@ -26,6 +26,7 @@ File format: should return false if match it to a topic. - Added a test to prevent a last will testament message to be published when a client is denied connection. [#8894](https://github.com/emqx/emqx/pull/8894) +- Disable authorization for `api/v4/emqx_prometheus` endpoint. [8955](https://github.com/emqx/emqx/pull/8955) ## v4.3.19 diff --git a/lib-ce/emqx_dashboard/src/emqx_dashboard.erl b/lib-ce/emqx_dashboard/src/emqx_dashboard.erl index d88bd0da9..517211607 100644 --- a/lib-ce/emqx_dashboard/src/emqx_dashboard.erl +++ b/lib-ce/emqx_dashboard/src/emqx_dashboard.erl @@ -109,6 +109,8 @@ http_handlers() -> is_authorized(Req) -> is_authorized(binary_to_list(cowboy_req:path(Req)), Req). +is_authorized("/api/v4/emqx_prometheus", _Req) -> + true; is_authorized("/api/v4/auth", _Req) -> true; is_authorized(_Path, Req) ->