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 -*- %% -*- mode: erlang -*-
{application, emqx_auth_jwt, [ {application, emqx_auth_jwt, [
{description, "EMQX JWT Authentication and Authorization"}, {description, "EMQX JWT Authentication and Authorization"},
{vsn, "0.2.0"}, {vsn, "0.2.1"},
{registered, []}, {registered, []},
{mod, {emqx_auth_jwt_app, []}}, {mod, {emqx_auth_jwt_app, []}},
{applications, [ {applications, [

View File

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