@azteam/express 1.2.319 → 1.2.321
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/AdminController.js +1 -1
- package/lib/Server.js +5 -5
- package/package.json +1 -1
- package/src/AdminController.js +1 -0
- package/src/Server.js +4 -2
package/lib/AdminController.js
CHANGED
|
@@ -34,7 +34,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
34
34
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
35
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
36
36
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
|
-
var ALLOW_FIELDS = ['created_at', 'created_id', 'modified_at', 'modified_id', 'deleted_at', 'deleted_id', 'restored_id', 'resource', 'priority', 'is_processing'];
|
|
37
|
+
var ALLOW_FIELDS = ['created_at', 'created_id', 'modified_at', 'modified_id', 'deleted_at', 'deleted_id', 'restored_id', 'resource', 'priority', 'is_processing', 'is_synchronized'];
|
|
38
38
|
var AdminController = /*#__PURE__*/function (_Controller) {
|
|
39
39
|
_inherits(AdminController, _Controller);
|
|
40
40
|
var _super = _createSuper(AdminController);
|
package/lib/Server.js
CHANGED
|
@@ -142,12 +142,12 @@ var Server = /*#__PURE__*/function () {
|
|
|
142
142
|
if (!IS_ALLOW_EMPTY) {
|
|
143
143
|
error = new _error.ErrorException(_error.CORS, "Not allowed by CORS");
|
|
144
144
|
}
|
|
145
|
-
} else if (!WHITE_LIST.some(function (re) {
|
|
146
|
-
return origin.endsWith(re);
|
|
147
|
-
})) {
|
|
148
|
-
error = new _error.ErrorException(_error.CORS, "".concat(origin, " Not allowed by CORS"));
|
|
149
145
|
}
|
|
146
|
+
// else if (!WHITE_LIST.some((re) => origin.endsWith(re))) {
|
|
147
|
+
// error = new ErrorException(CORS, `${origin} Not allowed by CORS`);
|
|
148
|
+
// }
|
|
150
149
|
}
|
|
150
|
+
|
|
151
151
|
callback(error, {
|
|
152
152
|
credentials: true,
|
|
153
153
|
origin: true
|
|
@@ -213,7 +213,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
213
213
|
var responseGuard = guard;
|
|
214
214
|
var responseAllows = allow;
|
|
215
215
|
if (_lodash["default"].isArray(guard)) {
|
|
216
|
-
responseGuard = [].concat(_toConsumableArray(guard), ['__v', '_id', 'created_at', 'created_id', 'modified_at', 'modified_id', 'deleted_at', 'deleted_id', 'restored_id', 'resource', 'is_processing', 'priority']);
|
|
216
|
+
responseGuard = [].concat(_toConsumableArray(guard), ['__v', '_id', 'created_at', 'created_id', 'modified_at', 'modified_id', 'deleted_at', 'deleted_id', 'restored_id', 'resource', 'is_processing', 'is_synchronized', 'priority']);
|
|
217
217
|
}
|
|
218
218
|
if (resType === RES_TYPE.DOCS) {
|
|
219
219
|
guardData.docs = (0, _util.omitArrayItem)(data.docs, responseGuard, responseAllows);
|
package/package.json
CHANGED
package/src/AdminController.js
CHANGED
package/src/Server.js
CHANGED
|
@@ -125,9 +125,10 @@ class Server {
|
|
|
125
125
|
if (!IS_ALLOW_EMPTY) {
|
|
126
126
|
error = new ErrorException(CORS, `Not allowed by CORS`);
|
|
127
127
|
}
|
|
128
|
-
} else if (!WHITE_LIST.some((re) => origin.endsWith(re))) {
|
|
129
|
-
error = new ErrorException(CORS, `${origin} Not allowed by CORS`);
|
|
130
128
|
}
|
|
129
|
+
// else if (!WHITE_LIST.some((re) => origin.endsWith(re))) {
|
|
130
|
+
// error = new ErrorException(CORS, `${origin} Not allowed by CORS`);
|
|
131
|
+
// }
|
|
131
132
|
}
|
|
132
133
|
callback(error, {
|
|
133
134
|
credentials: true,
|
|
@@ -196,6 +197,7 @@ class Server {
|
|
|
196
197
|
|
|
197
198
|
'resource',
|
|
198
199
|
'is_processing',
|
|
200
|
+
'is_synchronized',
|
|
199
201
|
'priority',
|
|
200
202
|
];
|
|
201
203
|
}
|