feature: implemented cors using the config system. 

Use a cors.json file to set Origin, Headers, Methods and Credentials. Also updated the example project to include a sample