Blame view

doraemon/middleware/disable-BFCache.js 237 Bytes
陈轩 authored
1 2 3 4 5 6 7 8 9 10 11
/**
 *  disable Back forward cache
 */
module.exports = (req, res, next) => {
    res.set({
        'Cache-Control': 'no-cache, max-age=0, must-revalidate, no-store',
        Pragma: 'no-cache',
        Expires: 0
    });
    next();
};