{"action":"created","issue":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3504","labels_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3504/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3504/comments","events_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3504/events","html_url":"https://github.com/pouchdb/pouchdb/issues/3504","id":56666994,"number":3504,"title":"Allow self-signed SSL certificates","user":{"login":"bnjbvr","id":1180019,"avatar_url":"https://avatars.githubusercontent.com/u/1180019?v=3","gravatar_id":"","url":"https://api.github.com/users/bnjbvr","html_url":"https://github.com/bnjbvr","followers_url":"https://api.github.com/users/bnjbvr/followers","following_url":"https://api.github.com/users/bnjbvr/following{/other_user}","gists_url":"https://api.github.com/users/bnjbvr/gists{/gist_id}","starred_url":"https://api.github.com/users/bnjbvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnjbvr/subscriptions","organizations_url":"https://api.github.com/users/bnjbvr/orgs","repos_url":"https://api.github.com/users/bnjbvr/repos","events_url":"https://api.github.com/users/bnjbvr/events{/privacy}","received_events_url":"https://api.github.com/users/bnjbvr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-05T12:59:33Z","updated_at":"2015-02-06T11:06:53Z","closed_at":null,"body":"I am using pouchdb, syncing to a remote couchdb instance which is hosted at a https URL.  The certificate is self-signed, because that's a personal server and I am trusting myself (!).  However, pouchdb (run under node) doesn't seem to work with this configuration, and it is rejecting all requests with a 400 status.  Inspecting the request options in http.js showed me that nodejs is emitting the error \"unable_to_verify_leaf_signature\", which is indicating that the SSL certificate is rejected.  A work around is to set NODE_TLS_REJECT_UNAUTHORIZED to 0 in the environment (bash or in node), but I would like to have a way to tell pouchdb it's fine to have self-signed SSL certificates.  Does that sound doable?"},"comment":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/comments/73221053","html_url":"https://github.com/pouchdb/pouchdb/issues/3504#issuecomment-73221053","issue_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3504","id":73221053,"user":{"login":"bnjbvr","id":1180019,"avatar_url":"https://avatars.githubusercontent.com/u/1180019?v=3","gravatar_id":"","url":"https://api.github.com/users/bnjbvr","html_url":"https://github.com/bnjbvr","followers_url":"https://api.github.com/users/bnjbvr/followers","following_url":"https://api.github.com/users/bnjbvr/following{/other_user}","gists_url":"https://api.github.com/users/bnjbvr/gists{/gist_id}","starred_url":"https://api.github.com/users/bnjbvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnjbvr/subscriptions","organizations_url":"https://api.github.com/users/bnjbvr/orgs","repos_url":"https://api.github.com/users/bnjbvr/repos","events_url":"https://api.github.com/users/bnjbvr/events{/privacy}","received_events_url":"https://api.github.com/users/bnjbvr/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T11:06:53Z","updated_at":"2015-02-06T11:06:53Z","body":"Nice! However, option arguments are not transferred to the lowest level. The place that matters for my use case is there [0]. Simply adding opts the constructor does the trick. \r\n\r\n[0] https://github.com/pouchdb/pouchdb/blob/master/lib/replicate.js#L578"}}