Fixed uri to take into account port from config