@tuya-sat/micro-dev-proxy 3.2.2 → 3.2.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.
Files changed (2) hide show
  1. package/dist/appProxy.js +2 -1
  2. package/package.json +1 -1
package/dist/appProxy.js CHANGED
@@ -204,7 +204,8 @@ class AppProxy {
204
204
  if (!this.isMainApp && !isApiBelongMainApp.includes(req.url)) {
205
205
  const apiPathMatchReg = /\/(:[^/]+|\$?{[^/]+})/g;
206
206
  const apis = mf.apis || [];
207
- if (!(req === null || req === void 0 ? void 0 : req.headers['micro-app-id'].includes('main-app'))) {
207
+ const microAppId = req.headers['micro-app-id'];
208
+ if (microAppId && !microAppId.includes('main-app')) {
208
209
  const method = (req === null || req === void 0 ? void 0 : req.method) || 'GET';
209
210
  const urlPath = ((_b = req === null || req === void 0 ? void 0 : req.path) === null || _b === void 0 ? void 0 : _b.replace(/^\s*\/(custom-api|open-api)/, '')) || '';
210
211
  let isExists = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/micro-dev-proxy",
3
- "version": "3.2.2",
3
+ "version": "3.2.4",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {