-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from yushijinhun/develop
Release v1.2.5
- Loading branch information
Showing
2 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2020 Haowei Wen <[email protected]> and contributors | ||
* Copyright (C) 2024 Haowei Wen <[email protected]> and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
|
@@ -49,12 +49,15 @@ public QueryUUIDsFilter(YggdrasilClient mojangClient, YggdrasilClient customClie | |
|
||
@Override | ||
public boolean canHandle(String domain) { | ||
return domain.equals("api.mojang.com"); | ||
return domain.equals("api.mojang.com") || domain.equals("api.minecraftservices.com"); | ||
} | ||
|
||
@Override | ||
public Optional<Response> handle(String domain, String path, IHTTPSession session) throws IOException { | ||
if (domain.equals("api.mojang.com") && path.equals("/profiles/minecraft") && session.getMethod().equals("POST")) { | ||
if ( | ||
(domain.equals("api.mojang.com") && path.equals("/profiles/minecraft") && session.getMethod().equals("POST")) || | ||
(domain.equals("api.minecraftservices.com") && path.equals("/minecraft/profile/lookup/bulk/byname") && session.getMethod().equals("POST")) | ||
) { | ||
Set<String> request = new LinkedHashSet<>(); | ||
asJsonArray(parseJson(asString(asBytes(session.getInputStream())))) | ||
.forEach(element -> request.add(asJsonString(element))); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters