PLT-6358: Server HTTP client improvements (#6980)
* restrict untrusted, internal http connections by default * command test fix * more test fixes * change setting from toggle to whitelist * requested ui changes * add isdefault diagnostic * fix tests
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
504582b824
Коммит
ffbf8e51fe
@@ -682,7 +682,7 @@ func sendToPushProxy(msg model.PushNotification, session *model.Session) {
|
||||
|
||||
request, _ := http.NewRequest("POST", *utils.Cfg.EmailSettings.PushNotificationServer+model.API_URL_SUFFIX_V1+"/send_push", strings.NewReader(msg.ToJson()))
|
||||
|
||||
if resp, err := utils.HttpClient().Do(request); err != nil {
|
||||
if resp, err := utils.HttpClient(true).Do(request); err != nil {
|
||||
l4g.Error("Device push reported as error for UserId=%v SessionId=%v message=%v", session.UserId, session.Id, err.Error())
|
||||
} else {
|
||||
pushResponse := model.PushResponseFromJson(resp.Body)
|
||||
|
||||
Ссылка в новой задаче
Block a user