aboutsummaryrefslogtreecommitdiffhomepage
path: root/http
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-01-22 20:43:03 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-01-22 20:43:03 -0800
commit577bcddb2afc1d337ea2bbe74b5e6dc7c54f6c00 (patch)
treec73dd87796ea2fe83210e83b6e635038e0bca861 /http
parentda5c8c2edb4e7978bc3ef989ee774c3407905fac (diff)
Change user agent
Diffstat (limited to 'http')
-rw-r--r--http/client.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/http/client.go b/http/client.go
index b8541a2..09da43b 100644
--- a/http/client.go
+++ b/http/client.go
@@ -17,10 +17,9 @@ import (
"github.com/miniflux/miniflux/logger"
"github.com/miniflux/miniflux/timer"
+ "github.com/miniflux/miniflux/version"
)
-// Note: Some websites have a user agent filter.
-const userAgent = "Mozilla/5.0 (like Gecko, like Safari, like Chrome) - Miniflux <https://miniflux.net/>"
const requestTimeout = 300
const maxBodySize = 1024 * 1024 * 15
@@ -136,7 +135,7 @@ func (c *Client) buildClient() http.Client {
func (c *Client) buildHeaders() http.Header {
headers := make(http.Header)
- headers.Add("User-Agent", userAgent)
+ headers.Add("User-Agent", "Mozilla/5.0 (compatible; Miniflux/"+version.Version+"; +https://miniflux.net)")
headers.Add("Accept", "*/*")
if c.etagHeader != "" {