You’re trying to climb more than one tree if you intend to rely on origin. It is not universally supported and cannot be relied 100%. In other words, not all browsers send it with requests. Also, the same issue, in regards to security and identity, is involved. Everything HTTP is text and can be faked. Also, if using PHP and if you don’t have origin setup as a system var in your PHP configuration, the server will not report it even if it does come in.
Finally, this is an Infusionsoft forum and origin is a browser/server matter. You might also try checking your server or browser documentation as well.