mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
add no-cache entries in HTTP header
add no-cache entries in HTTP header
This commit is contained in:
parent
d7d40254d4
commit
df597f53b2
@ -61,17 +61,16 @@ var Fetcher = function(url, reloadInterval, encoding) {
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
// console.log("Can't parse feed item:");
|
||||
// console.log(item);
|
||||
// console.log('Title: ' + title);
|
||||
// console.log('Description: ' + description);
|
||||
// console.log('Pubdate: ' + pubdate);
|
||||
|
||||
console.log("Can't parse feed item:");
|
||||
console.log(item);
|
||||
console.log("Title: " + title);
|
||||
console.log("Description: " + description);
|
||||
console.log("Pubdate: " + pubdate);
|
||||
}
|
||||
});
|
||||
|
||||
parser.on("end", function() {
|
||||
parser.on("end", function() {
|
||||
//console.log("end parsing - " + url);
|
||||
self.broadcastItems();
|
||||
scheduleTimer();
|
||||
});
|
||||
@ -83,7 +82,9 @@ var Fetcher = function(url, reloadInterval, encoding) {
|
||||
|
||||
|
||||
nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
|
||||
headers = {"User-Agent": "Mozilla/5.0 (Node.js "+ nodeVersion + ") MagicMirror/" + global.version + " (https://github.com/MichMich/MagicMirror/)"}
|
||||
headers = {"User-Agent": "Mozilla/5.0 (Node.js "+ nodeVersion + ") MagicMirror/" + global.version + " (https://github.com/MichMich/MagicMirror/)",
|
||||
"Cache-Control": "max-age=0, no-cache, no-store, must-revalidate",
|
||||
"Pragma": "no-cache"}
|
||||
|
||||
request({uri: url, encoding: null, headers: headers})
|
||||
.on("error", function(error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user