adminizer 4.5.0-build.188 → 4.5.0-build.190
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/index.d.ts +2 -0
- package/index.js +2 -0
- package/interfaces/global.d.ts +1 -0
- package/lib/inertia/inertiaAdapter.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export * from "./lib/model/AbstractModel";
|
|
|
19
19
|
export * from "./lib/model/adapter/waterline";
|
|
20
20
|
export * from "./lib/model/adapter/sequelize";
|
|
21
21
|
export * from "./lib/media-manager/AbstractMediaManager";
|
|
22
|
+
export * from "./lib/controls/AbstractControls";
|
|
23
|
+
export * from "./lib/controls/ControlsHandler";
|
|
22
24
|
export * from "./lib/Adminizer";
|
|
23
25
|
export * from "./models/GroupAP";
|
|
24
26
|
export * from "./models/UserAP";
|
package/index.js
CHANGED
|
@@ -19,6 +19,8 @@ export * from "./lib/model/AbstractModel.js";
|
|
|
19
19
|
export * from "./lib/model/adapter/waterline.js";
|
|
20
20
|
export * from "./lib/model/adapter/sequelize.js";
|
|
21
21
|
export * from "./lib/media-manager/AbstractMediaManager.js";
|
|
22
|
+
export * from "./lib/controls/AbstractControls.js";
|
|
23
|
+
export * from "./lib/controls/ControlsHandler.js";
|
|
22
24
|
export * from "./lib/Adminizer.js";
|
|
23
25
|
export * from "./models/GroupAP.js";
|
|
24
26
|
export * from "./models/UserAP.js";
|
package/interfaces/global.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ const inertiaExpressAdapter = function ({ version, html, flashMessages, enableRe
|
|
|
19
19
|
secure: process.env.NODE_ENV === 'production' && process.env.CSRF_COOKIE_INSECURE !== '1',
|
|
20
20
|
sameSite: 'lax',
|
|
21
21
|
});
|
|
22
|
-
// Checking CSRF only for non-GET requests AND non-API routes
|
|
23
|
-
if (!['GET', 'HEAD', 'OPTIONS'].includes(req.method)) {
|
|
22
|
+
// Checking CSRF only for non-GET requests AND non-API routes AND not explicitly skipped
|
|
23
|
+
if (!req._skipCSRF && !['GET', 'HEAD', 'OPTIONS'].includes(req.method)) {
|
|
24
24
|
const csrfCookie = req.cookies['XSRF-TOKEN'];
|
|
25
25
|
const csrfHeader = req.headers[csrf.headerName || 'x-xsrf-token'];
|
|
26
26
|
if (!csrfCookie || !csrfHeader || csrfCookie !== csrfHeader) {
|