Added rate limiting logging and an error page for hitting the rate limit on opening characters

This commit is contained in:
Thaum Rystra
2018-04-02 14:26:55 +02:00
parent 164ba78c81
commit 742b26b0de
6 changed files with 79 additions and 7 deletions

View File

@@ -0,0 +1,17 @@
Template.error.onRendered(function(){
const error = Session.get("error") || {};
if (error.href) window.history.replaceState("", "", error.href);
});
Template.error.helpers({
errorMessage: function(){
const error = Session.get("error") || {};
return error.reason;
},
});
Template.error.events({
"click .try-again": function(event, instance){
window.location.reload();
},
});