Added local $http configuration

fixes #349