An origin contains a scheme, host and effective port. A name that begins with your hostname can still belong to an attacker. A different scheme or port also describes a different origin. For this browser-only write endpoint, compare the complete Origin header with the origin configured by the server.
The policy here rejects a missing Origin and the opaque value null. It also refuses a caller-supplied fallback header. That choice is deliberate: these endpoints serve the browser application only. A service integration that omits Origin would need a separate authentication and request policy. The safe-method exercise keeps a read-only GET available without approving a write. These labs inspect request fields directly; they don't simulate all browser enforcement or replace session-bound CSRF tokens where those are required.
Check the full Origin value on a browser-only write endpoint.