prepare Cryptomator to eventually change the update check URL

This commit is contained in:
Sebastian Stenzel 2022-05-10 11:36:40 +02:00
parent f50eb1f047
commit 120be431ee
No known key found for this signature in database
GPG Key ID: 667B866EA8240A09

View File

@ -43,7 +43,9 @@ public abstract class UpdateCheckerModule {
@FxApplicationScoped @FxApplicationScoped
static Optional<HttpClient> provideHttpClient() { static Optional<HttpClient> provideHttpClient() {
try { try {
return Optional.of(HttpClient.newHttpClient()); return Optional.of(HttpClient.newBuilder() //
.followRedirects(HttpClient.Redirect.NORMAL) // from version 1.6.11 onwards, Cryptomator can follow redirects, in case this URL ever changes
.build());
} catch (UncheckedIOException e) { } catch (UncheckedIOException e) {
LOG.error("HttpClient for update check cannot be created.", e); LOG.error("HttpClient for update check cannot be created.", e);
return Optional.empty(); return Optional.empty();