From ca7b351c6364c32d530d9089b63e65b6e1fb786f Mon Sep 17 00:00:00 2001 From: pppscn <35696959@qq.com> Date: Sun, 24 Jul 2022 22:17:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9Abark/gotify=E9=80=9A?= =?UTF-8?q?=E9=81=93=E5=BF=BD=E7=95=A5https=E8=AF=81=E4=B9=A6=EF=BC=88?= =?UTF-8?q?=E6=8F=90=E9=AB=98=E8=87=AA=E5=BB=BA=E6=9C=8D=E5=8A=A1=E7=AB=AF?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/idormy/sms/forwarder/utils/sender/BarkUtils.kt | 3 ++- .../java/com/idormy/sms/forwarder/utils/sender/GotifyUtils.kt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/idormy/sms/forwarder/utils/sender/BarkUtils.kt b/app/src/main/java/com/idormy/sms/forwarder/utils/sender/BarkUtils.kt index 24a5231d5e..54780101ef 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/utils/sender/BarkUtils.kt +++ b/app/src/main/java/com/idormy/sms/forwarder/utils/sender/BarkUtils.kt @@ -74,7 +74,8 @@ class BarkUtils { } } - request.keepJson(true) + request.ignoreHttpsCert() //忽略https证书 + .keepJson(true) .timeOut((SettingUtils.requestTimeout * 1000).toLong()) //超时时间10s .cacheMode(CacheMode.NO_CACHE) .retryCount(SettingUtils.requestRetryTimes) //超时重试的次数 diff --git a/app/src/main/java/com/idormy/sms/forwarder/utils/sender/GotifyUtils.kt b/app/src/main/java/com/idormy/sms/forwarder/utils/sender/GotifyUtils.kt index 3a2f508275..53f5c9ce91 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/utils/sender/GotifyUtils.kt +++ b/app/src/main/java/com/idormy/sms/forwarder/utils/sender/GotifyUtils.kt @@ -52,6 +52,7 @@ class GotifyUtils { request.params("title", title) .params("message", content) .params("priority", setting.priority) + .ignoreHttpsCert() //忽略https证书 .keepJson(true) .timeOut((SettingUtils.requestTimeout * 1000).toLong()) //超时时间10s .cacheMode(CacheMode.NO_CACHE)