@azteam/express 1.2.252 → 1.2.253
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/package.json +1 -1
- package/src/Server.js +2 -1
package/package.json
CHANGED
package/src/Server.js
CHANGED
|
@@ -152,10 +152,11 @@ class Server {
|
|
|
152
152
|
cors(function (req, callback) {
|
|
153
153
|
const origin = req.header('Origin');
|
|
154
154
|
const authorization = req.header('Authorization');
|
|
155
|
+
const appSecret = req.header('x-app-secret');
|
|
155
156
|
|
|
156
157
|
let error = null;
|
|
157
158
|
|
|
158
|
-
if (!authorization) {
|
|
159
|
+
if (!authorization && !appSecret) {
|
|
159
160
|
if (!origin) {
|
|
160
161
|
if (!isAllowEmptyOrigin) {
|
|
161
162
|
error = new ErrorException(CORS, `Not allowed by CORS`);
|