Middleware to allow cross domain request