Definition
What is domain lock?
Domain lock is a protection that restricts where JavaScript code is allowed to execute. JavaScript is delivered to the browser as it runs, which means anyone who visits your site can copy it and host it themselves.
Without a restriction, copied code runs anywhere. An attacker can lift your client-side application and deploy it on their own domain, reusing your work directly.
Domain lock prevents this. The code checks the domain it is running on against a list of domains you authorized. On an authorized domain it runs normally. Anywhere else, it refuses to execute.
