I have added the following configuration to my httpd.conf file in apache and it is working now.
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Max-Age "1000"
Header always set Access-Control-Allow-Headers "*"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
But this should have been added through dreamfactory CORS settings.