From b708191267e68586c9b7e7ad3167ed2fd0bad2ab Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 13 Apr 2024 15:59:44 +0100 Subject: [PATCH] add more endpoints to check the status for --- src/main/java/cc/fascinated/common/WebRequest.java | 2 +- src/main/java/cc/fascinated/service/MojangService.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/cc/fascinated/common/WebRequest.java b/src/main/java/cc/fascinated/common/WebRequest.java index b1fdbae..76001ad 100644 --- a/src/main/java/cc/fascinated/common/WebRequest.java +++ b/src/main/java/cc/fascinated/common/WebRequest.java @@ -18,7 +18,7 @@ public class WebRequest { static { HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); - requestFactory.setConnectTimeout(5000); // 5 seconds + requestFactory.setConnectTimeout(2500); // 2.5 seconds CLIENT = RestClient.builder() .requestFactory(requestFactory) .build(); diff --git a/src/main/java/cc/fascinated/service/MojangService.java b/src/main/java/cc/fascinated/service/MojangService.java index b5b575e..97a5e95 100644 --- a/src/main/java/cc/fascinated/service/MojangService.java +++ b/src/main/java/cc/fascinated/service/MojangService.java @@ -55,6 +55,10 @@ public class MojangService { private static final String MOJANG_ENDPOINT_STATUS_KEY = "mojang"; private static final List MOJANG_ENDPOINTS = List.of( new EndpointStatus("https://textures.minecraft.net", List.of(HttpStatus.BAD_REQUEST)), + new EndpointStatus("https://session.minecraft.net", List.of(HttpStatus.NOT_FOUND)), + new EndpointStatus("https://libraries.minecraft.net", List.of(HttpStatus.NOT_FOUND)), + new EndpointStatus("https://assets.mojang.com", List.of(HttpStatus.NOT_FOUND)), + new EndpointStatus("https://api.minecraftservices.com", List.of(HttpStatus.FORBIDDEN)), new EndpointStatus(API_ENDPOINT, List.of(HttpStatus.OK)), new EndpointStatus(SESSION_SERVER_ENDPOINT, List.of(HttpStatus.FORBIDDEN)) );