We are planning to create a few javascript widgets which will be served to clients. Lets take a calculator as an example. Now, there will be a javascript file for this and it will be served to the clients using our own CDN.
In time, we may roll out new features for this calculator but these features will be enabled only to selected customers who pay for them. Can anyone give me an idea of how to enable features for selected clients and still use the same CDN for all?
Another thing is, if the update is a bug-fix, then this should be rolled out to all clients.
I don’t want create individual versions for each client as there will be lot of widgets and it will get messy real quick.
If this doesn’t make sense, please leave a comment and I will explain in detail.
You need to identify your users by forcing clients to add API key to requests or check for HTTP Referers (or both). Then just generate Javascript code on serverside.