@autofleet/zehut 3.0.10-beta-5 → 3.0.10-beta-6

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/lib/user/index.js CHANGED
@@ -35,6 +35,10 @@ const appDoesNotExist_1 = __importDefault(require("../exceptions/appDoesNotExist
35
35
  const utils_1 = require("../utils");
36
36
  const middleware = (options = {}) => async (req, res, next) => {
37
37
  try {
38
+ const originHeader = req.headers['X-IAF-ORIGIN-SERVICE'] || req.headers['x-iaf-origin-service'] || '';
39
+ if (originHeader.toLowerCase() === 'identity-ms') {
40
+ return next();
41
+ }
38
42
  const { eagerLoadUserPermissions, eagerLoadUserPermissionsLegacy, customPermissionLoader, } = options;
39
43
  const userId = req.headers['x-af-user-id'];
40
44
  const trace = (0, tracer_1.newTrace)('userPayload');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/zehut",
3
- "version": "3.0.10-beta-5",
3
+ "version": "3.0.10-beta-6",
4
4
  "description": "manage user's identity",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",