Issue #62 - Common util for referring host

Added common utility to determine referring host to replace duplicate
code.
Merge pull request #65 from daveegrant/master

Issue #62 - Common util for referring host