header routing

This commit is contained in:
bronku 2025-11-25 11:45:06 +01:00
parent ef47d7082c
commit 71d1b559a8
5 changed files with 36 additions and 55 deletions

View file

@ -1,13 +1 @@
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>
welcome to nginx