@xeno-js/core 4.1.0 → 4.1.1
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3131,7 +3131,7 @@ var CsrfMiddleware = class {
|
|
|
3131
3131
|
const isStateChanging = ["POST", "PUT", "DELETE", "PATCH"].includes(method);
|
|
3132
3132
|
if (isStateChanging) {
|
|
3133
3133
|
const policy = this._getRouteMatcher().checkRoutePolicy(req.path, method);
|
|
3134
|
-
if (Guards47.isDefined(policy.withCsrf) && policy.withCsrf) return await next();
|
|
3134
|
+
if (Guards47.isDefined(policy.withCsrf) && !policy.withCsrf) return await next();
|
|
3135
3135
|
const { network, tracing, identity } = this._requestContext.getContext() ?? {};
|
|
3136
3136
|
const headerToken = network?.csrf;
|
|
3137
3137
|
const cookieToken = network?.csrfCookie;
|