make
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user