Commit 0cf19bc 1 parent 831ad60 commit 0cf19bc Copy full SHA for 0cf19bc
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,15 +81,15 @@ const swaggerCustomOptions = {
81
81
const openapiSpecification = swaggerJsdoc ( swaggerOptions ) ;
82
82
83
83
// set cache control middleware
84
- let setCache = function ( req , res , next ) {
84
+ const setCache = ( req , res , next ) => {
85
85
// period in seconds, currently 5 minutes
86
86
// set this lower if we need to have more frequent update
87
87
const period = 10
88
88
89
89
// cache only for GET requests
90
- if ( req . method == 'GET' ) {
90
+ if ( req . method === 'GET' ) {
91
91
res . set ( 'Cache-control' , `public, max-age=${ period } ` )
92
- } else if ( req . hostname == 'kryptokrona.org' ) {
92
+ } else if ( req . hostname === 'kryptokrona.org' ) {
93
93
res . set ( 'Cache-control' , `no-store` )
94
94
} else {
95
95
// for the other requests set strict no caching parameters
You can’t perform that action at this time.
0 commit comments