fix api authorization with digest auth
Merge pull request #2651 from dimagi/digest-api-fix

fix api authorization with digest auth