fix(emqx_authn_jwks): add a user-agent header to jwks HTTP request

This commit is contained in:
Serge Tupchii 2024-06-07 16:32:54 +03:00
parent a2a598469e
commit a13c961744
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
{application, emqx_auth_jwt, [
{description, "EMQX JWT Authentication and Authorization"},
{vsn, "0.2.0"},
{vsn, "0.2.1"},
{registered, []},
{mod, {emqx_auth_jwt_app, []}},
{applications, [

View File

@ -159,7 +159,10 @@ refresh_jwks(
case
httpc:request(
get,
{Endpoint, [{"Accept", "application/json"}]},
{Endpoint, [
{"Accept", "application/json"},
{"User-Agent", "EMQX/" ++ emqx_release:version_with_prefix()}
]},
HTTPOpts,
[{body_format, binary}, {sync, false}, {receiver, self()}]
)