mirror of
https://github.com/ssyyhhrr/stewardle.git
synced 2025-11-17 14:23:40 -05:00
No Cache Fix
This commit is contained in:
9
app.js
9
app.js
@@ -226,7 +226,14 @@ function server() {
|
||||
app.enable("trust proxy")
|
||||
|
||||
app.use(express.urlencoded({ extended: true }))
|
||||
app.use(express.static("assets"))
|
||||
app.use(express.static("assets", {
|
||||
setHeaders: function(res, path, stat) {
|
||||
// Set cache control headers
|
||||
res.set('Cache-Control', 'no-cache, no-store, must-revalidate');
|
||||
res.set('Pragma', 'no-cache');
|
||||
res.set('Expires', '0');
|
||||
}
|
||||
}))
|
||||
app.use(favicon('assets/favicon.ico'))
|
||||
app.use(morgan("combined"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user