mirror of https://github.com/Aidaho12/haproxy-wi
v7.2.2.0: Add timezone support to WAF rule configuration
The update adds timezone handling for web application firewall (WAF) rule configurations using roxy_wi_tools.GetDate method. This provides flexibility to manage configurations based on the specified timezone in SQL setting.pull/377/head
parent
4441a6e0b7
commit
f17fec9403
|
@ -97,6 +97,7 @@ def waf_rule_edit(service, server_ip, rule_id):
|
|||
else:
|
||||
config_path = sql.get_setting('haproxy_dir')
|
||||
|
||||
get_date = roxy_wi_tools.GetDate(sql.get_setting('time_zone'))
|
||||
waf_rule_file = waf_sql.select_waf_rule_by_id(rule_id)
|
||||
configs_dir = sql.get_setting('tmp_config_path')
|
||||
cfg = f"{configs_dir}{server_ip}-{get_date.return_date('config')}-{waf_rule_file}"
|
||||
|
@ -135,6 +136,7 @@ def waf_save_config(service, server_ip, rule_id):
|
|||
roxywi_auth.page_for_admin(level=2)
|
||||
roxywi_common.check_is_server_in_group(server_ip)
|
||||
|
||||
get_date = roxy_wi_tools.GetDate(sql.get_setting('time_zone'))
|
||||
configs_dir = sql.get_setting('tmp_config_path')
|
||||
cfg = f"{configs_dir}{server_ip}-{get_date.return_date('config')}"
|
||||
config_file_name = request.form.get('config_file_name')
|
||||
|
|
Loading…
Reference in New Issue