yize/xswitch

希望可以按照域名启用规则

yize opened this issue · 2 comments

yize commented

增加 enable 功能,在指定域名下开启规则。

{
  // Use IntelliSense to learn about possible links.
  // Type `rule` to quick insert rule.
  // 输入 rule 来快速插入规则
  // For more information, visit: https://github.com/yize/xswitch
  "proxy": [
    [
      "https://unpkg.com/react@16.4.1/umd/react.production.min.js",
      "https://unpkg.com/react@16.4.1/umd/react.development.js"
    ],
    // `Command/Ctrl + click` to visit:
    // https://unpkg.com/react@16.4.1/umd/react.production.min.js
    // [
      // "(.*)/path1/path2/(.*)", // https://www.sample.com/path1/path2/index.js
      // "http://127.0.0.1:3000/$2", // http://127.0.0.1:3000/index.js
    // ],
  ],
  // urls that want CORS
  // "cors": [
    // "mocks.a.com",
    // "mocks.b.com"
  // ]
  "enable": [
    "a.b.com"
  ],
}

已处理,待验证~

请问这个功能最后上了吗?