feat(resources): add custom request and response headers #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/custom-headers"
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?
Summary
feat/path-routing); retarget tomainonce #2 to #5 are merged.Changes
resource_headerstable (reversible, portable): up to 50 per resource, unique per resource, direction and canonical name.Headeris the single definition of valid headers, shared by the changeset and the renderer: names are HTTP tokens stored in canonical case (sox-aandX-Acannot both exist); values may not contain line breaks or control characters; framing and hop-by-hop headers are refused;Remote-UserandRemote-Emailcannot be set on requests because access control uses them to tell the backend who signed in.Resources.add_header/3,get_header!/2,delete_header/2: admin-only,{:error, :not_http}for TCP/UDP resources, tenant-scoped.DynamicConfigrenders oneheadersmiddleware per resource on every router of the resource, chained after forwardAuth and before the path rewrite; invalid stored rows are dropped.Verification
compile --warnings-as-errors,credo --strictclean;mix dialyzer0 errors on both backends.Remote-Userdoes not reach the backend. Observed: settingHoston a request changes the host the backend sees (documented, and pinned by a test). Added and refused headers also checked in the browser.Not included