Skip to content

Commit

Permalink
Set User-Agent on get/set password recovery email
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhpedersen committed Mar 29, 2024
1 parent 8d78c42 commit 1e245bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/cmsapi/password_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"io"
"net/http"
"net/url"

"github.com/la5nta/pat/internal/buildinfo"
)

const (
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 1e245bf

Please sign in to comment.