nuke/lib
lif 71147b4857
fix: respect Accept-Language quality factors in language detection (#1380)
The Accept-Language header parsing was not correctly handling quality
factors. When a browser sends "en-GB,de-DE;q=0.5", the expected behavior
is to prefer English (q=1.0 by default) over German (q=0.5).

The fix uses golang.org/x/text/language.ParseAcceptLanguage to properly
parse and sort language preferences by quality factor. It also adds base
language fallbacks (e.g., "en" for "en-GB") to ensure regional variants
match their parent languages when no exact match exists.

Fixes #1022

Signed-off-by: majiayu000 <1835304752@qq.com>
2026-01-02 08:01:43 -05:00
..
challenge fix(config): deprecate the report_as field for challenges (#1311) 2025-11-25 23:25:17 -05:00
config Implement FCrDNS and other DNS features (#1308) 2025-11-26 22:24:45 -05:00
localization fix: respect Accept-Language quality factors in language detection (#1380) 2026-01-02 08:01:43 -05:00
policy feat: first implementation of honeypot logic (#1342) 2025-12-16 04:14:29 -05:00
store feat(store/valkey): Add Redis(R) Sentinel support (#1294) 2025-11-18 09:55:19 -05:00
testdata fix(config): deprecate the report_as field for challenges (#1311) 2025-11-25 23:25:17 -05:00
thoth chore: expose thoth in lib (#911) 2025-07-25 10:58:30 -04:00
anubis.go fix(config): deprecate the report_as field for challenges (#1311) 2025-11-25 23:25:17 -05:00
anubis_test.go fix(config): deprecate the report_as field for challenges (#1311) 2025-11-25 23:25:17 -05:00
config.go feat: first implementation of honeypot logic (#1342) 2025-12-16 04:14:29 -05:00
config_test.go feat: writing logs to the filesystem with rotation support (#1299) 2025-11-21 11:46:00 -05:00
http.go fix: SERVE_ROBOTS_TXT works again (#1229) 2025-10-31 09:08:33 -04:00
http_test.go perf: apply fieldalignement (#1284) 2025-11-16 20:43:07 +00:00
redirect_security_test.go perf: apply fieldalignement (#1284) 2025-11-16 20:43:07 +00:00