diff --git a/server.js b/server.js index e66681e..eae9b41 100644 --- a/server.js +++ b/server.js @@ -876,6 +876,10 @@ import LRU from "lru-cache" ejs.cache = new LRU({max:20}) function load_var(fina) { + if(!existsSync(fina)) { + console.log(1,"tried loading non-existent file",fina) + return ""; + } let out = readFileSync(fina) if(fina.endsWith(".js")) { return min_js(out.toString()).code @@ -928,7 +932,8 @@ let global_page_variables = { getPID: get_pid, getDMPID: get_dmpid, encryptJS: min_js(web_version().toString()).code, - cookiebanner: `` + cookiebanner: ``, + newrelic: load_var("./extra_modules/newrelic_monitor.html") } function handleUserFiles(request, response, overrideurl) { diff --git a/views/PrivacyPolicy.html b/views/PrivacyPolicy.html index 40d3f16..6ba425a 100644 --- a/views/PrivacyPolicy.html +++ b/views/PrivacyPolicy.html @@ -3,10 +3,13 @@ IPost Privacy Policy - - + <%- newrelic %> + + <%- navbar %>

Privacy Policy for IPost

At IPost, accessible from http://ipost.tk, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by IPost and how we use it.

diff --git a/views/ToS.html b/views/ToS.html index 41135ba..f044cb4 100644 --- a/views/ToS.html +++ b/views/ToS.html @@ -3,6 +3,7 @@ IPost Terms of Service + <%- newrelic %> diff --git a/views/changePW.html b/views/changePW.html index f527bab..b6e5698 100644 --- a/views/changePW.html +++ b/views/changePW.html @@ -5,6 +5,7 @@ Change Password + <%- newrelic %> diff --git a/views/changeUsername.html b/views/changeUsername.html index cb1e942..216293f 100644 --- a/views/changeUsername.html +++ b/views/changeUsername.html @@ -5,6 +5,7 @@ Change Password + <%- newrelic %> diff --git a/views/dms.html b/views/dms.html index 5fecbdc..71fc6fd 100644 --- a/views/dms.html +++ b/views/dms.html @@ -3,6 +3,7 @@ DMs + <%- newrelic %>