header routing

This commit is contained in:
bronku 2025-11-25 10:46:37 +01:00
parent 005ec377d8
commit ef47d7082c
3 changed files with 41 additions and 19 deletions

View file

@ -1 +1,13 @@
hello from nginx!
<button onclick="goToApp('java')">Go to Java</button>
<button onclick="goToApp('dotnet')">Go to .NET</button>
<script>
function goToApp(appName) {
fetch("/", {
headers: { "X-App-Type": appName },
})
.then((r) => r.text())
.then((t) => (document.body.innerHTML = t));
}
</script>