12345678910111213141516171819 |
- "use strict";
- var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- const http_1 = require("../base/http");
- const express_session_1 = __importDefault(require("express-session"));
- const util_1 = require("../base/util");
- class SessionMiddleware extends http_1.Middleware {
- constructor() {
- var _a, _b, _c, _d;
- super(...arguments);
- this.order = -98;
- this.route = null;
- this.action = (0, express_session_1.default)({ secret: ((_a = this.context.options) === null || _a === void 0 ? void 0 : _a.sessionSecret) || util_1.Guid.new(), resave: ((_b = this.context.options) === null || _b === void 0 ? void 0 : _b.sessionResave) || false, saveUninitialized: ((_c = this.context.options) === null || _c === void 0 ? void 0 : _c.sessionSaveUninitialized) || false, cookie: { maxAge: ((_d = this.context.options) === null || _d === void 0 ? void 0 : _d.sessionMaxAge) || 3600000 } });
- }
- }
- exports.default = SessionMiddleware;
- //# sourceMappingURL=SessionMiddleware.js.map
|