@azteam/express 1.2.366 → 1.2.372

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/Server.js CHANGED
@@ -134,10 +134,9 @@ var Server = /*#__PURE__*/function () {
134
134
  app.use((0, _cors["default"])(function (req, callback) {
135
135
  var origin = req.header('Origin'),
136
136
  authorization = req.header('Authorization'),
137
- agent = req.header('User-Agent'),
138
- balancing = req.header('X-LOAD-BALANCING');
137
+ agent = req.header('User-Agent');
139
138
  var error = null;
140
- if (!authorization && !agent.startsWith(SYSTEM_USER) && !balancing.startsWith(SYSTEM_USER)) {
139
+ if (!authorization && !agent.startsWith(SYSTEM_USER)) {
141
140
  if (!origin) {
142
141
  if (!IS_ALLOW_EMPTY) {
143
142
  error = new _error.ErrorException(_error.CORS, "Not allowed by CORS");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/express",
3
- "version": "1.2.366",
3
+ "version": "1.2.372",
4
4
  "license": "MIT",
5
5
  "author": "toda <sp.azsolution.net@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -13,7 +13,7 @@
13
13
  "@azteam/crypto": "1.0.34",
14
14
  "@azteam/error": "1.0.32",
15
15
  "@azteam/http-client": "1.0.109",
16
- "@azteam/util": "1.0.30",
16
+ "@azteam/util": "1.0.31",
17
17
  "@azteam/validator": "1.0.15",
18
18
  "@grpc/grpc-js": "1.6.7",
19
19
  "@grpc/proto-loader": "0.6.12",
package/src/Server.js CHANGED
@@ -116,11 +116,10 @@ class Server {
116
116
  cors(function (req, callback) {
117
117
  const origin = req.header('Origin'),
118
118
  authorization = req.header('Authorization'),
119
- agent = req.header('User-Agent'),
120
- balancing = req.header('X-LOAD-BALANCING');
119
+ agent = req.header('User-Agent');
121
120
 
122
121
  let error = null;
123
- if (!authorization && !agent.startsWith(SYSTEM_USER) && !balancing.startsWith(SYSTEM_USER)) {
122
+ if (!authorization && !agent.startsWith(SYSTEM_USER)) {
124
123
  if (!origin) {
125
124
  if (!IS_ALLOW_EMPTY) {
126
125
  error = new ErrorException(CORS, `Not allowed by CORS`);