CORS Toggle

In a nutshell adds all the headers to enable CORS.Internally it adds 'Allow-Control-Allow-Origin: *' and 'Access-Control-Allow-Methods: GET, PUT, POST, DELETE, HEAD and OPTIONS' response headers. In addition adds Access-Control-Allow-Headers to the response headers if the request has Access-Control-Request-Headers.