header routing
This commit is contained in:
parent
ef47d7082c
commit
71d1b559a8
5 changed files with 36 additions and 55 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue