Open pajot opened 1 year ago
Have you tried it with this addon: https://ankiweb.net/shared/info/358444159 ? I am also using an NGINX reverse proxy with HTTPS (pretty much the same configuration as you) with Anki 2.1.54 and I have
{
"syncaddr": "https://domain.com/anki/"
}
in the addon's settings and it works without issues.
Yes, I've tried it with custom sync server redirector and I get this error message when syncing:
error decoding response body: expected value at line 1 column 1
I have anki-sync-server running behind an nginx web server.
The nginx configuration looks like this:
nginx listens on port 27701 and anki-sync-server on 27702.
I configure the add-on manually using the instructions for > 2.1.28:
But when I try to sync, I get an error dialog telling me to check the database and try again. On the server side, I see this in the nginx error.log:
2022/11/16 00:09:41 [info] 199330#0: *35105 client sent plain HTTP request to HTTPS port while reading client request headers, client: <address>, server: dummy.net, request: "POST /sync/hostKey HTTP/1.1", host: "dummy.net:27701"
And nothing in the ankisyncd console output.
If I query the server with
curl https://dummy.net:27701
, I getAnki Sync Server
If I query it with
curl https://dummy.net:27701/sync/hostKey
, I getA server error occurred. Please contact the administrator.
and
[2022-11-16 00:42:57,861]:INFO:ankisyncd.http:127.0.0.1 "GET /sync/hostKey HTTP/1.0" 500 59
in the ankisyncd console output.
(But this is probably because my API request is not formatted correctly.)
It would appear that Anki is not speaking https, despite having specified it in the add-on configuration.