After all the hard work you've had to go through to complete your web game project, it wouldn't be fair if it ended up generating traffic and income on someone else's website. In this recipe, we will create a script that prevents the main game menu from showing up unless it's hosted by an authorized Server.
Preventing your game from running on unknown servers
Getting ready
For this recipe, you will need access to a webspace provider where you can host the game. However, you can test locally using a localhost web Server, such as the built-in PHP one, or an AMP Apache or Nginx web server.
You also will need to have installed the Unity WebGL build target.
NOTE: At the time of writing (summer 2018), for macOS...