mirror of https://github.com/statping/statping
				
				
				
			Improve browser emulation to address issue #878
							parent
							
								
									061ed6b8bd
								
							
						
					
					
						commit
						f0284f075b
					
				| 
						 | 
				
			
			@ -5,7 +5,6 @@ import (
 | 
			
		|||
	"crypto/tls"
 | 
			
		||||
	"errors"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"github.com/statping/statping/types/metrics"
 | 
			
		||||
	"io"
 | 
			
		||||
	"io/ioutil"
 | 
			
		||||
	"net"
 | 
			
		||||
| 
						 | 
				
			
			@ -17,6 +16,8 @@ import (
 | 
			
		|||
	"strings"
 | 
			
		||||
	"sync"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/statping/statping/types/metrics"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
| 
						 | 
				
			
			@ -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))
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1 +1 @@
 | 
			
		|||
0.90.72
 | 
			
		||||
0.90.72.1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue