Skip to content

docs: fix the proxy, CORS and redirect-cookie recipes - #13

Merged
muhammetsafak merged 2 commits into
mainfrom
docs/fix-unsafe-examples
Nov 24, 2026
Merged

muhammetsafak merged 2 commits into
mainfrom
docs/fix-unsafe-examples

Conversation

@muhammetsafak

Copy link
Copy Markdown
Contributor

Summary

Documentation-only change: examples that could be copied into an application in an unsafe form are corrected.

  • Proxy recipe: case-insensitive hop-by-hop removal (including headers named in Connection, and Trailer), derive Host from the upstream URI, cache only credential-free GET responses
  • CORS recipe: echo Origin only when it is on an allow-list
  • Redirect recipe: add Secure to the session cookie

Notes

  • Only docs/ and README.md change; src/, tests and CI are untouched, and library behavior is unchanged.
  • wiki-sync.sh --check docs passes.

- Proxy recipe: case-insensitive hop-by-hop removal (including headers named in `Connection`, and `Trailer`), derive `Host` from the upstream URI, cache only credential-free GET responses
- CORS recipe: echo `Origin` only when it is on an allow-list
- Redirect recipe: add `Secure` to the session cookie
- Replace the cache snippet with the conditions under which a proxied response may be shared (request, key, response, stored data)
- Fix the stale reference to $headers in the authentication note
@muhammetsafak
muhammetsafak merged commit 1a2fe98 into main Nov 24, 2026
7 checks passed
@muhammetsafak
muhammetsafak deleted the docs/fix-unsafe-examples branch November 24, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant