如何在 pouchdb 中向 HTTP 同步请求添加自定义标头?以下不起作用。我正在使用需要额外标头的中间件代理。我需要添加以下 2 个标头(授权和 APPID)。
var opts = {live: true, complete: syncError, withCredentials:true, headers: {Authorization : 'Basic ' + Base64.encode("user:pass"), 'APPID': 1001}};
db.replicate.to(remoteCouch, opts);