fix: ssl request on mobile

This commit is contained in:
Matheus Bona 2025-02-07 19:23:00 -03:00 committed by GitHub
parent 3576cc652c
commit b014a9546a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3158 additions and 0 deletions

3154
cacert.pem Normal file

File diff suppressed because it is too large Load diff

View file

@ -211,6 +211,10 @@ httplib::Result LoginHttp::loginHttpsJson(const std::string& host,
client.set_logger(
[this](const auto& req, const auto& res) { LoginHttp::Logger(req, res); });
client.set_ca_cert_path("./cacert.pem");
client.enable_server_certificate_verification(false);
client.enable_server_hostname_verification(false);
const json body = { {"email", email}, {"password", password}, {"stayloggedin", true}, {"type", "login"} };
const httplib::Headers headers = { {"User-Agent", "Mozilla/5.0"} };