Wrote CrossDomain Middleware for API