mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-04 03:40:32 +00:00
Fix disable tls setting
This commit is contained in:
@@ -435,6 +435,10 @@ public final class AppPrefs {
|
||||
|
||||
private AppPrefs() {}
|
||||
|
||||
public ObservableValue<Boolean> disableApiHttpsTlsCheck() {
|
||||
return disableApiHttpsTlsCheck;
|
||||
}
|
||||
|
||||
public ObservableValue<VaultAuthentication> vaultAuthentication() {
|
||||
return vaultAuthentication;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class HttpHelper {
|
||||
var builder = HttpClient.newBuilder();
|
||||
builder.version(HttpClient.Version.HTTP_1_1);
|
||||
builder.followRedirects(HttpClient.Redirect.NORMAL);
|
||||
if (AppPrefs.get() != null && AppPrefs.get().disableApiAuthentication().get()) {
|
||||
if (AppPrefs.get() != null && AppPrefs.get().disableApiHttpsTlsCheck().getValue()) {
|
||||
var sslContext = SSLContext.getInstance("TLS");
|
||||
var trustManager = new X509TrustManager() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user