mirror of
https://github.com/mjl-/mox.git
synced 2025-07-13 07:34:37 +03:00
on admin page, show warning when user hasn't enabled "check updates"
and send Accept-header when fetching changelog, so we can show an html version instead of json when requested by regular browsers.
This commit is contained in:
@ -151,6 +151,7 @@ func FetchChangelog(ctx context.Context, baseURL string, base Version, pubKey []
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("making request: %v", err)
|
||||
}
|
||||
req.Header.Add("Accept", "application/json")
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if resp == nil {
|
||||
resp = &http.Response{StatusCode: 0}
|
||||
|
Reference in New Issue
Block a user