code-workshop-kit
Version:
The future of remote code workshops & training
13 lines • 522 B
JavaScript
;
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