Allowed methods are listed in app.route, elif is noop here
This commit is contained in:
parent
542718b956
commit
e3a71a851d
@ -77,7 +77,7 @@ def create_app():
|
||||
])
|
||||
res = pfctl_cfg_write(f'f2b-jail/{remote_user}',
|
||||
b'\n'.join(cfg) + b'\n')
|
||||
elif request.method == 'DELETE':
|
||||
else: # 'DELETE':
|
||||
cfg = [cfg_line for cfg_line in cfg
|
||||
if cfg_line.find(bytes(f'<f2b-{name}>', 'ascii')) == -1]
|
||||
res = pfctl_cfg_write(f'f2b-jail/{remote_user}',
|
||||
@ -110,7 +110,7 @@ def create_app():
|
||||
table=f'f2b-{name}',
|
||||
operation='add',
|
||||
value=str(ip))
|
||||
elif request.method == 'DELETE':
|
||||
else: # 'DELETE':
|
||||
app.logger.info(f'Remove {ip} from f2b-{name}'
|
||||
f' in anchor f2b-jail/{remote_user}')
|
||||
res = pfctl_table_op(f'f2b-jail/{remote_user}',
|
||||
|
Loading…
x
Reference in New Issue
Block a user