fix api authorization with digest auth