v8.2: Fix typo in section name for HAProxy configuration

Correct the section name from 'default' to 'defaults' in the HAProxy configuration insert function. This ensures that the settings are applied to the correct section and improves the accuracy of the configuration process.
pull/399/head
Aidaho 2024-10-09 18:07:44 +03:00
parent df048c50ac
commit 7fdc977bc2
1 changed files with 1 additions and 1 deletions

View File

@ -413,7 +413,7 @@ def _create_default_config_in_db(server_id: int) -> None:
socket=[f'*:{hap_sock_p} level admin', '/var/run/haproxy.sock mode 600 level admin', '/var/lib/haproxy/stats']
)
add_sql.insert_or_update_new_section(server_id, 'global', 'global', config)
add_sql.insert_or_update_new_section(server_id, 'default', 'defaults', HaproxyDefaultsRequest())
add_sql.insert_or_update_new_section(server_id, 'defaults', 'defaults', HaproxyDefaultsRequest())
option = (
'http-request use-service prometheus-exporter if { path /metrics }\r\nstats enable\r\nstats uri /stats\r\n'
f'stats realm HAProxy-04\ Statistics\r\nstats auth {stats_user}:{stats_password}\r\nstats admin if TRUE'