Skip to content
Snippets Groups Projects
Commit 577bcddb authored by Frédéric Guillot's avatar Frédéric Guillot
Browse files

Change user agent

parent da5c8c2e
No related branches found
No related tags found
No related merge requests found
......@@ -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 != "" {
......
......@@ -5,7 +5,7 @@
package version
// Version of the application (generated with "make build")
var Version = "undefined"
var Version = "2.0.x-dev"
// BuildDate is generated with "make build"
var BuildDate = "undefined"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment