fix: Multiplayer network fixes and airplane mode

- Auto-select network interface for direct connect/host room
- Always recreate ENet client on join for fresh bindings
- Add airplane mode toggle (Desktop & Android)
- Fix JWT verification with empty verify_uid
- Improve content-type handling for JWT endpoints

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-11-10 17:16:45 +10:00
parent 2943eebc9c
commit be5c2f772c
16 changed files with 129 additions and 15 deletions

View File

@@ -138,7 +138,15 @@ struct Client::Impl {
return WebResult{WebResult::Code::WrongContent, "", ""};
}
if (content_type->second.find(accept) == std::string::npos) {
// For GetExternalJWT, be more lenient with content-type to handle error responses
// The API may return text/plain for errors, but we still want to process the response
bool content_type_valid = content_type->second.find(accept) != std::string::npos;
if (!content_type_valid && accept == "text/html") {
// Also accept text/plain for JWT endpoints (error responses)
content_type_valid = content_type->second.find("text/plain") != std::string::npos;
}
if (!content_type_valid) {
LOG_ERROR(WebService, "{} to {} returned wrong content: {}", method, host + path,
content_type->second);
return WebResult{WebResult::Code::WrongContent, "Wrong content", ""};