I'm trying to restrict access to a Netlify URL and finding myself lost.
I recently created an HTML5 game as a hobby/side project using Construct 3. I used Netlify to deploy it. I plan to sell the game on my Wix website. I embed the URL on a page that is for paid members only. This setup works perfectly EXCEPT any customer can inspect the site data and see the Netlify URL, then share or re-post the link elsewhere.
I want to make it so that the only way the URL works is if it's accessed or "referred" through my website. My limited knowledge + Google led me to the idea of CORS, but it's still a bit over my head.
It seems I can add a "header" snippet to my Netlify build to do this, but then I get stuck, unsure of what exactly my script should look like. Is that the correct approach? I hope my description makes sense. Any help is appreciated and if someone can get this to work for me (and they like Escape Room Games) I'll hook you up!
*I tried domain-locking my game, but due to the fact the URL is embed, I don't think that will work. If I don't allow the Netlify URL, it won't work on my Wix site. If I allow the Netlify URL, it can still be accessed outside of my Wix site.