• This project
    • Loading...
  • Sign in

fe / yohobuywap-node · Files

Go to a project

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
  • yohobuywap-node
  • doraemon
  • middleware
  • disable-BFCache.js
  • fix 5712 5714
    c7721d56
    by 陈轩
    2016-11-25 13:51:45 +0800  
    Browse Files
disable-BFCache.js 237 Bytes
Raw Blame History Permalink
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();
};