Trial using the default Java hostname verifier instead of okhttp's (#2134)

This commit is contained in:
Luck 2020-04-05 17:41:32 +01:00
parent d2e60eb5ac
commit cee34d0c31
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -66,6 +66,8 @@ import java.util.Optional;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.HttpsURLConnection;
public abstract class AbstractLuckPermsPlugin implements LuckPermsPlugin {
// init during load
@ -118,7 +120,13 @@ public abstract class AbstractLuckPermsPlugin implements LuckPermsPlugin {
this.localeManager.tryLoad(this, getBootstrap().getConfigDirectory().resolve("lang.yml"));
// setup a bytebin instance
this.bytebin = new BytebinClient(new OkHttpClient(), getConfiguration().get(ConfigKeys.BYTEBIN_URL), "luckperms");
this.bytebin = new BytebinClient(
new OkHttpClient.Builder()
.hostnameVerifier(HttpsURLConnection.getDefaultHostnameVerifier())
.build(),
getConfiguration().get(ConfigKeys.BYTEBIN_URL),
"luckperms"
);
// now the configuration is loaded, we can create a storage factory and load initial dependencies
StorageFactory storageFactory = new StorageFactory(this);