Refactor fetching header for difference between applet and transaction mode.

Improve locale_strings map by re json.encode.
Add method to put translation jsons into txn var and read with a json_query fetch inside template files not served by a lua view e.g. maintenance page
This commit is contained in:
Thomas Lynch
2023-05-21 15:18:32 +10:00
parent c93ca7f16c
commit 14922d7e2f
11 changed files with 127 additions and 91 deletions

View File

@@ -7,6 +7,7 @@ core.register_action("captcha-check", { 'http-req', }, bot_check.check_captcha_s
core.register_action("pow-check", { 'http-req', }, bot_check.check_pow_status)
core.register_action("decide-checks-necessary", { 'http-req', }, bot_check.decide_checks_necessary)
core.register_action("kill-tor-circuit", { 'http-req', }, bot_check.kill_tor_circuit)
core.register_action("set-lang-json", { 'http-req', }, bot_check.set_lang_json)
local backends_map = Map.new('/etc/haproxy/map/backends.map', Map._str)
function get_server_names(txn)