Skip to content

Commit 1f0dbcc

Browse files
authored
🎨 #3516【公众号】修正代理认证请求头设置错误的问题
1 parent 404102a commit 1f0dbcc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpServiceOkHttpImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ public void initHttp() {
5050
clientBuilder.proxy(getRequestHttpProxy().getProxy());
5151

5252
//设置授权
53-
clientBuilder.authenticator(new Authenticator() {
53+
clientBuilder.proxyAuthenticator(new Authenticator() {
5454
@Override
5555
public Request authenticate(Route route, Response response) throws IOException {
5656
String credential = Credentials.basic(httpProxy.getProxyUsername(), httpProxy.getProxyPassword());
5757
return response.request().newBuilder()
58-
.header("Authorization", credential)
58+
.header("Proxy-Authorization", credential)
5959
.build();
6060
}
6161
});

0 commit comments

Comments
 (0)