@iushev/react-rbac 1.0.27 → 1.0.29

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.
@@ -28,10 +28,10 @@ class RbacCheckAccess extends rbac_1.BaseCheckAccess {
28
28
  }
29
29
  if (options.authorization) {
30
30
  const token = options.authorization();
31
- config.headers.common["Authorization"] = "Bearer " + token;
31
+ config.headers.Authorization = "Bearer " + token;
32
32
  }
33
33
  else {
34
- config.headers.common["Authorization"] = "";
34
+ config.headers.Authorization = undefined;
35
35
  }
36
36
  return config;
37
37
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iushev/react-rbac",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "private": false,
5
5
  "author": "Ivaylo Ushev",
6
6
  "description": "",
@@ -23,22 +23,22 @@
23
23
  "devDependencies": {
24
24
  "@types/react": "^18.0.21",
25
25
  "@types/react-dom": "^18.0.6",
26
- "@typescript-eslint/eslint-plugin": "^5.39.0",
27
- "@typescript-eslint/parser": "^5.39.0",
28
- "eslint": "^8.24.0",
26
+ "@typescript-eslint/eslint-plugin": "^5.40.1",
27
+ "@typescript-eslint/parser": "^5.40.1",
28
+ "eslint": "^8.25.0",
29
29
  "eslint-config-prettier": "^8.5.0",
30
30
  "eslint-plugin-prettier": "^4.2.1",
31
- "eslint-plugin-react": "^7.31.8",
31
+ "eslint-plugin-react": "^7.31.10",
32
32
  "eslint-plugin-react-hooks": "^4.6.0",
33
- "jest": "^29.1.2",
33
+ "jest": "^29.2.1",
34
34
  "prettier": "^2.7.1",
35
35
  "rimraf": "^3.0.2",
36
36
  "ts-jest": "^29.0.3",
37
37
  "typescript": "^4.8.4"
38
38
  },
39
39
  "peerDependencies": {
40
- "@iushev/rbac": "^1.0.38",
41
- "axios": "0.27.2",
40
+ "@iushev/rbac": "^1.0.40",
41
+ "axios": "^1.1.3",
42
42
  "react": "^16.14.0 || ^17.0.2",
43
43
  "react-dom": "^16.14.0 || ^17.0.2"
44
44
  },
@@ -38,9 +38,9 @@ export default class RbacCheckAccess extends BaseCheckAccess {
38
38
 
39
39
  if (options.authorization) {
40
40
  const token = options.authorization();
41
- (config.headers.common as any as Record<string, string>)["Authorization"] = "Bearer " + token;
41
+ config.headers.Authorization = "Bearer " + token;
42
42
  } else {
43
- (config.headers.common as any as Record<string, string>)["Authorization"] = "";
43
+ config.headers.Authorization = undefined;
44
44
  }
45
45
  return config;
46
46
  });