From 1e245bf87fac826d763940da8fdcc4d5203850d5 Mon Sep 17 00:00:00 2001 From: Martin Hebnes Pedersen Date: Fri, 29 Mar 2024 11:35:26 +0100 Subject: [PATCH] Set User-Agent on get/set password recovery email --- internal/cmsapi/password_recovery.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/cmsapi/password_recovery.go b/internal/cmsapi/password_recovery.go index c15261f6..db571ecc 100644 --- a/internal/cmsapi/password_recovery.go +++ b/internal/cmsapi/password_recovery.go @@ -8,6 +8,8 @@ import ( "io" "net/http" "net/url" + + "github.com/la5nta/pat/internal/buildinfo" ) const ( @@ -87,6 +89,7 @@ func newJSONRequest(method string, path string, queryParams url.Values, body io. if err != nil { panic(err) } + req.Header.Set("User-Agent", buildinfo.UserAgent()) req.Header.Set("Accept", "application/json") if body != nil { req.Header.Set("Content-Type", "application/json")