Merge pull request #8955 from ieQu1/prom-4-3-disable

fix(prometheus): Disable auth for prometheus endpoint
This commit is contained in:
ieQu1 2022-09-14 09:29:37 +02:00 committed by GitHub
commit 2990d16544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,7 @@ File format:
should return false if match it to a topic. should return false if match it to a topic.
- Added a test to prevent a last will testament message to be - 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) 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 ## v4.3.19

View File

@ -109,6 +109,8 @@ http_handlers() ->
is_authorized(Req) -> is_authorized(Req) ->
is_authorized(binary_to_list(cowboy_req:path(Req)), 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) -> is_authorized("/api/v4/auth", _Req) ->
true; true;
is_authorized(_Path, Req) -> is_authorized(_Path, Req) ->