From 5b994d3f03479c19a5836973ec712442fa4add90 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 1 Apr 2024 15:24:43 +0200 Subject: Add warning when using incorrect NEU api proxy (#1070) --- src/main/kotlin/io/github/moulberry/notenoughupdates/util/UrsaClient.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/kotlin/io') diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/util/UrsaClient.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/util/UrsaClient.kt index 67df5bf9..4a6bc0e1 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/util/UrsaClient.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/util/UrsaClient.kt @@ -62,6 +62,8 @@ class UrsaClient(val apiUtil: ApiUtil) { get() = NotEnoughUpdates.INSTANCE.config.apiData.ursaApi.removeSuffix("/").takeIf { it.isNotBlank() } ?: "https://ursa.notenoughupdates.org" + fun hasNonStandardUrsa() = ursaRoot != "https://ursa.notenoughupdates.org" + private suspend fun authorizeRequest(usedUrsaRoot: String, connection: ApiUtil.Request, t: Token?) { if (t != null && t.obtainedFrom == usedUrsaRoot) { logger.log("Authorizing request using token") -- cgit