Couchdb 2381 fix missing right header

Hopefully third time lucky. I've just expanded a bit on @ocelotpotpie work so that we don't have the double api url issue.