Skip to content

Commit

Permalink
Remove unused setHeaders function from fastify static config
Browse files Browse the repository at this point in the history
The setHeaders function was defined but not used effectively in the static file configuration. This cleanup simplifies the code and prevents potential redundancy. The caching behavior remains unaltered as it is handled elsewhere.

Signed-off-by: Akama Aka <akama.aka@akami-solutions.cc>
  • Loading branch information
akama-aka committed Feb 18, 2025
1 parent c84331c commit f0330fc
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ const server = require('fastify')({logger: process})
}).register(require('@fastify/static'), { // For all Static files like Styling, JavaScript Cde
prefix: `/${process.env.PATH_IDENTIFIER}/assets/`,
preCompressed: true,
setHeaders: () => {
cacheControl: `public, max-age=${process.env.ASSETS_CACHE_TTL}`
},
root: join(__dirname + '/public/assets/')
})
Expand Down

0 comments on commit f0330fc

Please sign in to comment.