This commit is contained in:
Fabio Barbon 2026-02-02 21:28:59 +11:00 committed by GitHub
commit 00a5ff1961
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,10 @@ void addAuthHeaders(HTTPClient& http) {
http.addHeader("Accept", "application/vnd.koreader.v1+json");
http.addHeader("x-auth-user", KOREADER_STORE.getUsername().c_str());
http.addHeader("x-auth-key", KOREADER_STORE.getMd5Password().c_str());
// HTTP Basic Auth (RFC 7617) header. This is needed to support koreader sync server embedded in Calibre Web Automated
// (https://github.com/crocodilestick/Calibre-Web-Automated/blob/main/cps/progress_syncing/protocols/kosync.py)
http.setAuthorization(KOREADER_STORE.getUsername().c_str(), KOREADER_STORE.getPassword().c_str());
}
bool isHttpsUrl(const std::string& url) { return url.rfind("https://", 0) == 0; }