Rename the settings whose names do not say what they control (closes #234)
check / check (push) Waiting to run

Applies the setting renames of the naming audit under the SWW_WAF_ and
SWW_RPROXY_ prefixes, with sneak's names for the IP reputation cache
time and the two time limits, which now take milliseconds. The rproxy
log field default_disposition becomes waf_backend_no_answer, and
config.Config and config.FromEnvironment become config.WAF and
config.WAFFromEnvironment. Go fields, test names and prose follow. No
aliases; nothing reads the old names.

Model: opus-5-5
This commit was merged in pull request #370.
This commit is contained in:
clawbot committed 2026-11-12 11:13:27 +01:00
1 parent 94d60358ee
commit 4dad4fff43
100 files changed
+2261 -2019

No files matched your search

+6 -5
View File
@@ -65,12 +65,13 @@ type request struct {
start time.Time
// disposition is what is done with the request: waf's valid disposition,
// or SWW_RPROXY_DEFAULT_DISPOSITION. It is "" when neither gave one.
// or SWW_RPROXY_WAF_BACKEND_NO_ANSWER_DISPOSITION. It is "" when neither
// gave one.
disposition string
// answered is true when waf gave disposition, which makes a report due,
// and byDefault when SWW_RPROXY_DEFAULT_DISPOSITION did.
answered bool
byDefault bool
// and wafNoAnswer when SWW_RPROXY_WAF_BACKEND_NO_ANSWER_DISPOSITION did.
answered bool
wafNoAnswer bool
// asn and country are waf's X-Client-ASN and X-Client-Country, for the
// app.
asn, country string
@@ -454,7 +455,7 @@ func (rq *request) finish(ctx context.Context) {
),
DurationResponseMS: requestlog.Milliseconds(end.Sub(requestEnd)),
Disposition: rq.disposition,
DefaultDisposition: rq.byDefault,
WAFBackendNoAnswer: rq.wafNoAnswer,
},
)
if err != nil {