Can I ignore few static files in express static?

Viewed 3386
const express = require('express');

const app = express();

app.use('/app', express.static(path.resolve(__dirname, './app'), {
    maxage: '600s'
}))

app.listen(9292, function(err){
    if (err) console.log(err);
    console.log('listening at http:localhost:9292/app');
})

In my code have express static for serve static files. I want to add maxage header for few files not to all files.

Can I add maxage header for few files?

- app
    - js
      - app.js
    - css
       - app.css
    - index.html 

This is my app's static path. I want to add maxage header to all files instead of index.html

1 Answers
Related