Middleware for post cross domain request