server side code to integrate the whitelist