diff --git a/src/services/CouchService.ts b/src/services/CouchService.ts index 3e0183d..1848900 100644 --- a/src/services/CouchService.ts +++ b/src/services/CouchService.ts @@ -11,11 +11,11 @@ PouchDb.plugin(PouchDbAuthentication) const emit = debounce((ev: typeof SYNC, arr?: string[]) => bus.emit(ev, arr), 150) -const remoteConfig = { +const remoteConfig: PouchDB.Configuration.RemoteDatabaseConfiguration = { skip_setup: true, - ajax: { - cache: true, - withCredentials: true + fetch: (url, opts) => { + const init: RequestInit = { ...(opts ?? {}), credentials: 'include' } + return PouchDb.fetch(url as RequestInfo, init) } } const LOCALE_DB = 'VAQUANT_LOCALE_DB'