Handling CORS for publicly deployed npm package

I’m developing a npm package intended to be used in FrontEnd web. This package makes an API call to my Backend server. How can I handle CORS in my backend as the package will be used by others in their own domains?. I don’t want to store and whitelist the domains from everyone.