UNPKG

code-workshop-kit

Version:
13 lines 522 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.noCacheMiddleware = void 0; const CwkStateSingleton_1 = require("../utils/CwkStateSingleton"); const noCacheMiddleware = async (ctx, next) => { await next(); const { adminConfig } = CwkStateSingleton_1.cwkState.state; if (adminConfig && !adminConfig.enableCaching) { ctx.response.set('cache-control', 'no-store'); } }; exports.noCacheMiddleware = noCacheMiddleware; //# sourceMappingURL=no-cache-middleware.js.map