Add asynchronous page content request

This commit is contained in:
josh committed 2026-04-01 13:06:06 -04:00
1 parent ed4e749901
commit 244edf90ac
2 files changed
+26

No files matched your search

+13
View File
@@ -144,6 +144,19 @@
<h1><span><%= hostname %></span> status - MALP</h1>
</header>
<% if authenticated %>
<div id="content"></div>
<script>
fetch("?content", { credentials: "same-origin" })
.then(function(response) {
if (response.ok) return response.text();
})
.then(function(html) {
if (html) document.getElementById("content").innerHTML = html;
});
</script>
<% end %>
<% unless authenticated %>
<div class="card">
<div class="card-title">Sign In</div>