Monday 12 December 2016

Setting headers for images

How do you set headers for just your images? I know you do something like this in you server.js file:app.use(function(req,res,next){ res.set('Cache-Control','max-age=56789'); next(); }; But that only works for your landing page and doesn't affect images,css, etc. How would I go about just setting the Cache-Control for my images?

Submitted December 13, 2016 at 05:46AM by callback7

No comments:

Post a Comment