Closed agrueneberg closed 10 years ago
Unfortunately, I'm not aware of a work around. :-/ I have my main website over HTTPS but have the Anki server working over plain HTTP.
However, from an Anki plugin you can do pretty much anything! I don't know exactly how to do it, but I'm sure you could include your own certificates and override Anki's defaults.
Anki plugins are powerful, indeed! The following code disables SSL certificate validation:
import anki.sync
import httplib2
HTTP_TIMEOUT = 90
HTTP_PROXY = None
def myHttpCon():
return httplib2.Http(
timeout=HTTP_TIMEOUT,
proxy_info=HTTP_PROXY,
disable_ssl_certificate_validation=True)
anki.sync.SYNC_URL = 'https://localhost:27701/sync/'
anki.sync.httpCon = myHttpCon
Awesome! I'm glad you worked it out and thanks for sharing the solution. :-)
Hi David,
I would like to run anki-sync-server over SSL, but pointing
SYNC_URL
to the HTTPS URL is not enough because Anki does SSL certificate validation and only accepts the certificates for AnkiWeb inankiweb.certs
. Are you aware of any workaround?-ag