Skip to content

Commit

Permalink
Improve browser emulation to address issue statping#878
Browse files Browse the repository at this point in the history
  • Loading branch information
britannic committed Nov 14, 2020
1 parent 061ed6b commit f0284f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"crypto/tls"
"errors"
"fmt"
"github.com/statping/statping/types/metrics"
"io"
"io/ioutil"
"net"
Expand All @@ -17,6 +16,8 @@ import (
"strings"
"sync"
"time"

"github.com/statping/statping/types/metrics"
)

var (
Expand Down Expand Up @@ -175,6 +176,8 @@ func HttpRequest(endpoint, method string, contentType interface{}, headers []str
// set default headers so end user can overwrite them if needed
req.Header.Set("User-Agent", "Statping")
req.Header.Set("Statping-Version", Params.GetString("VERSION"))
req.Header.Set("Accept", "text/html")

if contentType != nil {
req.Header.Set("Content-Type", contentType.(string))
}
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.90.72
0.90.72.1

0 comments on commit f0284f0

Please sign in to comment.