Hair of the dog - origin of the phrase

Having a drink to cure a hangover is known as “having a little hair of the dog that bit you.” I am not interested in knowing about the reputed hangover cure itself, just the phrase. Was there ever a widely held belief in the ingestion of dog hair as a dog bite treatment? Was it just for the pain or was it believed to cure, for example, rabies?


Thanks, Ice Wolf.