Protecting Unity Web builds

not this time, thiefs!
Hello! The last time I was in a Ludum Dare my game was a little bit stolen by one of those browser games websites and to this day it’s still there, without my permission. This time I took some precautions! I want to share a very simple way to do it, in case it’s of interest to anyone.
The idea is to check the URL of the page the game is running on and then, if it’s not something you know and approve of, disable the game in some way. Here’s a bit of C# code that does exactly that. Don’t forget to check for ludumdare.com if you embed your game here. If you need me to explain the code with more details or have suggestions on how to improve it, let me know!
Oh, by the way, if the host turns out to be unknown, I wouldn’t just disable the game right away, but instead put a message after the title screen or the first level directing the user to your website or something like that. This way if the pesky thief doesn’t go far enough to see it, they will just generate free traffic for you! The tables have turned ( ͡° ͜ʖ ͡°)