headers: Rule.SetFunc computes headers per request #42
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/multiproxy!42
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/setfunc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #40.
Implements the proposal as written.
Rule.SetFuncruns per matching request, afterDeleteandSet. Its headers replace existing ones asSet's do. It gets the request with its context, and a nil result changes nothing.An error fails closed: the client gets
502 Bad Gatewaywith a generic body, the request is not forwarded, and the error goes to the server log through theloghelpers with the host. Caching is left to the function, as the issue settled. The CLI flags are unchanged.The header-rewriting how-to gains a section with the issue's example.