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 +1 -1
- package/server/proxy/web.js +14 -3
- package/utils/midfilter.js +0 -1
package/package.json
CHANGED
package/server/proxy/web.js
CHANGED
|
@@ -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 (
|
|
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);
|