A CSP will prevent this.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Co...
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Co...
Would be an additional method.
Your attack is not new/novel.
It's not a bad idea to just put in a CSP (always put in a CSP!), CORS policy, and Same-Origin. This is configured on your app rather than server (usually).
MDN is one of the better resources for this, and links out to other authoritative resources in the additional info section of a directive.