This commit is contained in:
Arc
2026-01-29 18:17:07 +00:00
parent dadff18a9c
commit 92c86eb837
2 changed files with 6 additions and 6 deletions
+3 -1
View File
@@ -309,7 +309,9 @@ def add_route_access_middleware(app: FastAPI):
request, f"Route not whitelisted: {path}", HTTPStatus.FORBIDDEN
)
if blacklist and any(_route_pattern_matches(route, path) for route in blacklist):
if blacklist and any(
_route_pattern_matches(route, path) for route in blacklist
):
return _response_by_accepted_type(
request, f"Route is blacklisted: {path}", HTTPStatus.FORBIDDEN
)
+3 -5
View File
@@ -73,9 +73,7 @@ window.PageAdmin = {
updateSettings() {
if (this.shouldConfirmRouteAccess()) {
LNbits.utils
.confirmDialog(
this.$t('route_access_save_confirm')
)
.confirmDialog(this.$t('route_access_save_confirm'))
.onOk(() => this.persistSettings())
return
}
@@ -87,8 +85,8 @@ window.PageAdmin = {
'lnbits_route_access_whitelist',
'lnbits_route_access_blacklist'
]
return fields.some(field =>
!_.isEqual(this.settings[field], this.formData[field])
return fields.some(
field => !_.isEqual(this.settings[field], this.formData[field])
)
},
persistSettings() {