mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-05-15 05:10:28 +02:00
21 lines
398 B
Go
21 lines
398 B
Go
//go:build ios
|
|
|
|
package gobackend
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func GetCloudflareBypassClient() *http.Client {
|
|
return sharedClient
|
|
}
|
|
|
|
func DoRequestWithCloudflareBypass(req *http.Request) (*http.Response, error) {
|
|
req.Header.Set("User-Agent", userAgentForURL(req.URL))
|
|
resp, err := sharedClient.Do(req)
|
|
if err != nil {
|
|
CheckAndLogISPBlocking(err, req.URL.String(), "HTTP")
|
|
}
|
|
return resp, err
|
|
}
|