mirror of
https://github.com/unmojang/authlib-injector.git
synced 2025-09-30 06:40:47 -04:00
Merge branch 'protocol-omit' into ali
This commit is contained in:
commit
58d0b0e7a1
@ -109,7 +109,7 @@ public final class AuthlibInjector {
|
||||
ExecutionEnvironment side = detectSide();
|
||||
Logging.LAUNCH.fine("Detected side: " + side);
|
||||
|
||||
apiRoot = appendSuffixSlash(apiRoot);
|
||||
apiRoot = parseInputUrl(apiRoot);
|
||||
Logging.CONFIG.info("API root: " + apiRoot);
|
||||
warnIfHttp(apiRoot);
|
||||
|
||||
@ -165,6 +165,16 @@ public final class AuthlibInjector {
|
||||
}
|
||||
}
|
||||
|
||||
private static String parseInputUrl(String url) {
|
||||
String lowercased = url.toLowerCase();
|
||||
if (!lowercased.startsWith("http://") && !lowercased.startsWith("https://")) {
|
||||
url = "https://" + url;
|
||||
}
|
||||
|
||||
url = appendSuffixSlash(url);
|
||||
return url;
|
||||
}
|
||||
|
||||
private static ExecutionEnvironment detectSide() {
|
||||
String specifiedSide = System.getProperty(PROP_SIDE);
|
||||
if (specifiedSide != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user