Rocky_Mountain_Vending/.pnpm-store/v10/files/78/08080a099e71f1d043fdd83ffe2cf4d25b37827bc768525591f3e31fb8c717e3cf1a2a63098d035c3e77cbb22f32b5635e596b447d8165baca25fc93a64128
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

38 lines
No EOL
1.4 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "patchSetHeaderWithCookieSupport", {
enumerable: true,
get: function() {
return patchSetHeaderWithCookieSupport;
}
});
const _requestmeta = require("../request-meta");
function patchSetHeaderWithCookieSupport(req, res) {
const setHeader = res.setHeader.bind(res);
res.setHeader = (name, value)=>{
// When renders /_error after page is failed, it could attempt to set
// headers after headers.
if ('headersSent' in res && res.headersSent) {
return res;
}
if (name.toLowerCase() === 'set-cookie') {
const middlewareValue = (0, _requestmeta.getRequestMeta)(req, 'middlewareCookie');
if (!middlewareValue || !Array.isArray(value) || !value.every((item, idx)=>item === middlewareValue[idx])) {
value = [
// TODO: (wyattjoh) find out why this is called multiple times resulting in duplicate cookies being added
...new Set([
...middlewareValue || [],
...typeof value === 'string' ? [
value
] : Array.isArray(value) ? value : []
])
];
}
}
return setHeader(name, value);
};
}
//# sourceMappingURL=patch-set-header.js.map