Fixes Uncaught SecurityError when trying to replace history state with an URL from a different Origin

Chrome throws this error when using a redirect to point an image source to an external URL : 
``` Uncaught SecurityError: A history state object with URL 'http://www.placecage.com/300/400' cannot be created in a document with origin 'http://localhost:3000'. ```

This skips the redirect URL history replace behaviour in these cases.