Pass location-object to fix XHR in sandbox