if (app.config.web.cors && !app.config.web.middlewares.cors) {
      app.config.web.middlewares.cors = require('@koa/cors')(
        typeof app.config.web.cors === 'object' ?
          app.config.web.cors : {}
      )