mastercontroller 1.3.32 → 1.3.34
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/MasterPipeline.js +4 -2
- package/package.json +1 -1
- package/security/SessionSecurity.js +1 -1
package/MasterPipeline.js
CHANGED
|
@@ -115,8 +115,10 @@ class MasterPipeline {
|
|
|
115
115
|
if (this._pathMatches(requestPath, path)) {
|
|
116
116
|
// Execute branch pipeline
|
|
117
117
|
await branch.execute(ctx);
|
|
118
|
-
//
|
|
119
|
-
|
|
118
|
+
// Stop if response already sent (e.g., auth rejection)
|
|
119
|
+
if (!ctx.response.headersSent && !ctx.response.writableEnded) {
|
|
120
|
+
await next();
|
|
121
|
+
}
|
|
120
122
|
} else {
|
|
121
123
|
// Skip branch, continue main pipeline
|
|
122
124
|
await next();
|
package/package.json
CHANGED
|
@@ -238,7 +238,7 @@ class SessionSecurity {
|
|
|
238
238
|
* Parse session cookie from request
|
|
239
239
|
*/
|
|
240
240
|
_parseCookie(req) {
|
|
241
|
-
const cookies = req
|
|
241
|
+
const cookies = req?.headers?.cookie;
|
|
242
242
|
if (!cookies) return null;
|
|
243
243
|
|
|
244
244
|
const match = cookies.match(new RegExp(`${this.cookieName}=([^;]+)`));
|