优化华为短信代码
This commit is contained in:
parent
f0e8642dec
commit
e34df5aaaa
|
@ -60,7 +60,9 @@ public class HuaweiSmsStrategy implements SmsStrategy {
|
||||||
// 使用 https
|
// 使用 https
|
||||||
trustAllHttpsCertificates();
|
trustAllHttpsCertificates();
|
||||||
|
|
||||||
URL realUrl = new URL(smsConfig.getUrl());
|
// 接入地址
|
||||||
|
String url = smsConfig.getUrl() + "/sms/batchSendSms/v1";
|
||||||
|
URL realUrl = new URL(url);
|
||||||
HttpsURLConnection connection = (HttpsURLConnection) realUrl.openConnection();
|
HttpsURLConnection connection = (HttpsURLConnection) realUrl.openConnection();
|
||||||
HostnameVerifier hv = (hostname, session) -> true;
|
HostnameVerifier hv = (hostname, session) -> true;
|
||||||
connection.setHostnameVerifier(hv);
|
connection.setHostnameVerifier(hv);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user