UNPKG

mihawk

Version:

A tiny & simple mock server tool, support json,js,cjs,ts(typescript).

13 lines (12 loc) 355 B
'use strict'; import { Debugger } from '../utils/print'; export default function cache() { Debugger.log('mdw-cache: init...'); return async function (ctx, next) { ctx.set('Pragma', 'No-cache'); ctx.set('Cache-Control', 'No-cache'); ctx.set('Expires', '0'); ctx.set('Vary', 'Origin'); await next(); }; }