message: feat(bundler-webpack): enable cros
diff: @@ -27,6 +27,20 @@ export async function createServer(opts: IOpts) {
  const { proxy } = userConfig;
  const app = express();
  + // cros
  + app.use((_req, res, next) => {
  + res.header('Access-Control-Allow-Origin', '*');
  + res.header(
  + 'Access-Control-Allow-Headers',
  + 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild',
  + );
  + res.header(
  + 'Access-Control-Allow-Methods',
  + 'PUT, POST, GET, DELETE, OPTIONS',
  + );
  + next();
  + });
  +
  // compression
  app.use(require('@umijs/bundler-webpack/compiled/compression')());
  