Skip to content

Commit 445f45e

Browse files
committed
fixed cases where caching is not enabled to prevent type errors
1 parent dacc84d commit 445f45e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

gulpfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ gulp.task('test', function() {
2929
// Override RATE LIMIT HERE FOR UNIT TEST
3030
process.env.RATE_LIMIT = 10;
3131
process.env.SECURE_MODE = true;
32+
process.env.NO_CACHE = 'no';
3233
gulp.src('./test', {read: false})
3334
// `gulp-mocha` needs filepaths so you can't have any plugins before it
3435
.pipe(mocha({reporter: 'spec'}));

services/response/ok.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function(data, cache){
4141
log.info('Sending ok response: ', data);
4242
if(data){
4343
// Only cache GET calls
44-
if(req.method === 'GET'){
44+
if(req.method === 'GET' && config.noFrontendCaching !== 'yes'){
4545

4646
// If this is a cached response, show response else cache the response and show response.
4747
if(cache){

0 commit comments

Comments
 (0)