You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While calling for the first time to an api, it showing network error but still it saving in cache. For next time it fetching from cache and working. Dynamic injected code in file
-> node_modules\tree-gateway\dist\pipeline\cache\server-cache.js
ServerCache.cacheStore.get(req.originalUrl, function(err, entry){
if (err) {
return next();
}
if (entry) {
res.contentType(entry.mimeType || "text/html");
res.send(new Buffer(entry.content, "base64"));
}
else {
req.parseRespBody = true;
var send = res.send.bind(res);
res.send = function (body) {
var ret = send(body);
if ( !body ) {
body = '';
}
body = new Buffer(body).toString("base64");
if ( typeof body !== "string" ) {
return ret;
}
if ((res.statusCode >= 200 && res.statusCode < 300) || (res.statusCode === 304)){
ServerCache.cacheStore.set(req.originalUrl, {content: body,mimeType: this._headers["content-type"]}, 10000);
}
return ret;
};
return next();
}
});
return;
The text was updated successfully, but these errors were encountered:
While calling for the first time to an api, it showing network error but still it saving in cache. For next time it fetching from cache and working. Dynamic injected code in file
-> node_modules\tree-gateway\dist\pipeline\cache\server-cache.js
ServerCache.cacheStore.get(req.originalUrl, function(err, entry){
if (err) {
return next();
});
return;
The text was updated successfully, but these errors were encountered: