feat: route whitelist/blacklist

security feature middleware to block/allow routes
This commit is contained in:
Arc
2026-01-29 18:11:28 +00:00
parent 87c1684a63
commit dadff18a9c
3 changed files with 56 additions and 6 deletions
@@ -35,6 +35,19 @@ window.app.component('lnbits-admin-security', {
this.routeOptionsLoading = false
}
},
addRouteOption(value, done) {
const route = value.trim()
if (!route) {
done()
return
}
if (!this.routeOptions.includes(route)) {
this.routeOptions.push(route)
this.routeOptions.sort()
}
this.routeOptionsFiltered = this.routeOptions
done(route)
},
filterRouteOptions(val, update) {
update(() => {
if (!val) {