Self-hostable uptime monitor and status page on Django: HTTP checks, Lighthouse audits, SEO crawls, and email and Discord alerts.
djangodockerhandcodedpythonself-hostedsqlitestatus-pageuptime-monitoringvite
1document.addEventListener("DOMContentLoaded", function () {
2 const form = document.getElementById("is-public-form");
3 if (!form) { return; }
4 form.addEventListener("change", function () {
5 let url = new URL(window.location.href);
6 url = url.origin + url.pathname + "is-public/";
7 fetch(url, {
8 method: "POST",
9 headers: {
10 "Content-Type": "application/json",
11 "X-CSRFToken": form.querySelector("input[name=csrfmiddlewaretoken]").value,
12 },
13 }).then(function () {
14 window.location.reload();
15 });
16 });
17});