We are SaaS platform and using amazon cdn for our static files. We have placed our code snippet on cdn and any our client can insert link on this code snippet into their website(like
We need to block some old websites that are using our code snippet and didn't delete it. So for example, they added our code snippet, stop using our saas but we still getting a lot of request to webserver from them.
Right now we are creating static file on cdn with domain name(example.com.json for example), and when code snippet loaded on some site it's checking if this file with domain name exists and prevent sending request to our webserver.
Maybe there is any better solution for this?