Fix for #880 by implementing simple same origin policy logic and making it an optional configuration
Merge pull request #881 from toddwest/master

Optional same origin policy with real implementation