aboutsummaryrefslogtreecommitdiffstats
path: root/cache.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2017-04-14 19:56:41 -0700
committerAdam Soltys <[email protected]>2017-04-14 19:56:41 -0700
commit7c5601109ae170cacb8b0df936c97e4006adbb03 (patch)
tree4aeb3346d33c5ae30c6b7e8ab7f22f5e079f3c53 /cache.js
parentb7a4332e9487659532ea50cd8063d0cd44011dce (diff)
downloadcoinos-server-7c5601109ae170cacb8b0df936c97e4006adbb03.tar.gz
coinos-server-7c5601109ae170cacb8b0df936c97e4006adbb03.zip
server refactor and jwt auth
Diffstat (limited to 'cache.js')
-rw-r--r--cache.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/cache.js b/cache.js
new file mode 100644
index 00000000..645fd610
--- /dev/null
+++ b/cache.js
@@ -0,0 +1,6 @@
+module.exports = (req, res, next) => {
+ if (req.path !== '/login') {
+ res.setHeader("Cache-Control", "public, max-age=900")
+ }
+ return next()
+}