feat: allow running elk with a single server (#1606)
This commit is contained in:
parent
61428cd9cd
commit
53d0812efd
22 changed files with 232 additions and 79 deletions
10
middleware/2.single-instance.global.ts
Normal file
10
middleware/2.single-instance.global.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
export default defineNuxtRouteMiddleware(async (to) => {
|
||||
if (process.server || !useAppConfig().singleInstanceServer)
|
||||
return
|
||||
|
||||
if (to.params.server) {
|
||||
const newTo = { ...to }
|
||||
delete newTo.params.server
|
||||
return newTo
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue