Fix for #880 Optional same origin policy with real implementation

A small update to allow the same origin check to be optional and attempt to match on the real values