yakuza0 2.23.6-beta.2 → 2.23.6-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.23.6-beta.2",
3
+ "version": "2.23.6-beta.4",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -123,7 +123,9 @@ exports.default = function () {
123
123
  while (1) {
124
124
  switch (_context3.prev = _context3.next) {
125
125
  case 0:
126
- _server._.forEach(proxyConf, function (baseUrl, key) {
126
+ _server._.forEach(proxyConf, function (proxyOpts, key) {
127
+ var baseUrl = typeof proxyOpts === "string" ? proxyOpts : proxyOpts && proxyOpts.target || '';
128
+ var proxyOptions = typeof proxyOpts !== "string" ? proxyOpts : {};
127
129
  var local = _config2.default.proxyServer.apiKey === key;
128
130
  if (local) {
129
131
  app.use(function (ctx, next) {
@@ -165,8 +167,7 @@ exports.default = function () {
165
167
  }
166
168
 
167
169
  return path;
168
- }
169
- }))(ctx, next);
170
+ } }, proxyOptions))(ctx, next);
170
171
  });
171
172
  }
172
173
  });
@@ -248,6 +249,16 @@ exports.default = function () {
248
249
  });
249
250
  }
250
251
  });
252
+ // _.forEach(yConf.proxyServer.proxyOptions, dt => {
253
+ // if (dt.match && minimatch(key, dt.match)) {
254
+ // if (dt.pathRewrite === true) {
255
+ // console.log(proxyReq, 11);
256
+ // }
257
+ // _.forEach(dt.headers, (v, k) => {
258
+ // proxyReq.setHeader(k, v);
259
+ // })
260
+ // }
261
+ // })
251
262
 
252
263
  // proxyReq.setHeader('host', proxyReq.host);
253
264
  // proxyReq.setHeader('host', proxyReq.host);
@@ -24,7 +24,6 @@ var mid = function mid(targetDir) {
24
24
  }
25
25
  }
26
26
  if (/'\.\.\\\\middleware\\\\/g.exec(content)) {
27
- console.log(111);
28
27
  replaceInFileSync(_mid, /\\\\/g, "/");
29
28
  }
30
29
  }