diff --git a/.gitignore b/.gitignore index 0a0275a..323d53d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .DS_STORE *.rdb .nyc_output +.idea diff --git a/src/apicache.js b/src/apicache.js index ac90887..c3bcb4a 100644 --- a/src/apicache.js +++ b/src/apicache.js @@ -256,7 +256,7 @@ function ApiCache() { 0, (duration / 1000 - (new Date().getTime() / 1000 - cacheObject.timestamp)).toFixed(0) ), - }) + }, globalOptions.headers) // only embed apicache headers when not in production environment if (process.env.NODE_ENV !== 'production') { diff --git a/test/apicache_test.js b/test/apicache_test.js index 08652bb..b1c1a0e 100644 --- a/test/apicache_test.js +++ b/test/apicache_test.js @@ -699,6 +699,7 @@ describe('.middleware {MIDDLEWARE}', function() { .expect('apicache-store', 'memory') .expect('apicache-version', pkg.version) .expect(200, movies) + .expect('Cache-Control', 'no-cache') .then(assertNumRequestsProcessed(app, 1)) }) })