add newrelic website info collector

This commit is contained in:
Mystikfluu 2022-09-25 13:49:30 +02:00
parent 5b68c43ecf
commit 49ac093bf7
14 changed files with 24 additions and 4 deletions

View File

@ -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: `<script id="cookieyes" type="text/javascript" src="https://cdn-cookieyes.com/client_data/3cf33f6b631f3587bf83813b/script.js" async></script>`
cookiebanner: `<script id="cookieyes" type="text/javascript" src="https://cdn-cookieyes.com/client_data/3cf33f6b631f3587bf83813b/script.js" async></script>`,
newrelic: load_var("./extra_modules/newrelic_monitor.html")
}
function handleUserFiles(request, response, overrideurl) {

View File

@ -3,10 +3,13 @@
<head>
<meta charset="utf-8">
<title>IPost Privacy Policy</title>
<script src="/js/addnavbar.js" charset="utf-8"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
<%- newrelic %>
<script>
<%- warnmessagejs %>
</script>
</head>
<body>
<%- navbar %>
<h1>Privacy Policy for IPost</h1>
<p>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.</p>

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
<title>IPost Terms of Service</title>
<%- newrelic %>
<script src="/js/addnavbar.js" charset="utf-8"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
</head>

View File

@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Change Password</title>
<%- newrelic %>
<link rel="stylesheet" href="/css/changePW.css">
<link rel="stylesheet" href="/css/global.css">
<script src="/js/addnavbar.js" charset="utf-8"></script>

View File

@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Change Password</title>
<%- newrelic %>
<link rel="stylesheet" href="/css/changePW.css">
<link rel="stylesheet" href="/css/global.css">
<script src="/js/addnavbar.js" charset="utf-8"></script>

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
<title>DMs</title>
<%- newrelic %>
<style>
<%- globalcss %>
<%- loadfile("./css/posts.css") %>

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<%- newrelic %>
<style>
<%- globalcss %>
<%- loadfile("./css/logon.css") %>

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<%- newrelic %>
<link rel="stylesheet" href="/css/logon.css">
<script src="/js/warn_message.js" charset="utf-8"></script>
<script type="text/javascript">

View File

@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>USERS Page</title>
<%- newrelic %>
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/global.css">
<script src="/js/addnavbar.js" charset="utf-8"></script>

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
<title>Posts</title>
<%- newrelic %>
<style>
<%- globalcss %>
<%- loadfile("./css/posts.css") %>

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<%- newrelic %>
<link rel="stylesheet" href="/css/logon.css">
<script src="/js/warn_message.js" charset="utf-8"></script>
<script type="text/javascript">

View File

@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search</title>
<%- newrelic %>
<link rel="stylesheet" href="/css/search.css">
<script type="text/javascript" src="/js/htmlescape.js"></script>
<link rel="stylesheet" href="/css/global.css">

View File

@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IPost | User settings</title>
<%- newrelic %>
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/global.css">
<script src="/js/addnavbar.js" charset="utf-8"></script>

View File

@ -4,7 +4,8 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Logged In</title>
<title>User | IPost</title>
<%- newrelic %>
<style>
<%- globalcss %>
<%- loadfile("./css/style.css") %>