Conditionally enable cors only if requesturl.host != document.location.host