docs: add Optional Security Headers via Reverse Proxy section to the Caddy HTTPS guide#1286
Merged
Classic298 merged 1 commit intoJun 6, 2026
Conversation
…y guide Purely additive section in docs/reference/https/caddy.md for operators who run Open WebUI behind a shared reverse proxy or managed hosting without app-layer env-var access. Includes a single-layer-only warning (duplicate headers), the five unambiguous headers with an HSTS caveat, and a pointer to the hardening docs; CSP is intentionally left to the CONTENT_SECURITY_POLICY env var.
Collaborator
|
This is excellent, thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: docs: add "Optional: Security Headers via Reverse Proxy" section to the Caddy HTTPS guide
Motivation
The existing Security Headers
documentation covers setting headers at the application layer via environment variables — the
recommended and primary path.
What is currently missing is guidance for operators who run Open WebUI behind a shared reverse proxy
serving multiple applications, or who are on managed hosting without direct
docker run/ Compose envvar access. These operators may need to set headers at the proxy layer, but
caddy.mdcurrentlyincludes no security-header guidance and no pointer to
hardening.md— and, importantly, no warningabout setting headers in both layers at once (which produces duplicate headers).
This PR closes that gap for the Caddy guide with one small, focused, purely additive section. (If it's
useful, the same can follow for the nginx and HAProxy guides — kept separate to keep each change easy
to review.)
What changes
docs/reference/https/caddy.md— new section## Optional: Security Headers via Reverse Proxy,inserted after
## Testing HTTPS, before## Updating Open WebUI.The section:
hardening.mdas the recommended primary path (env vars).headers actually do (CSP combined by intersection; HSTS / X-Frame-Options become browser-dependent).
headerblock for the five unambiguous headers (HSTS, X-Frame-Options,X-Content-Type-Options, Referrer-Policy, Permissions-Policy), with an explicit HSTS caveat.
CONTENT_SECURITY_POLICYenv var (it is too deployment-specific toship a generic proxy-layer policy), pointing back to the hardening docs.
Notes
hardening.md.verify against their own deployment (
curl -sIone-liner included in the section).hardening.md.headerblock uses only standard Caddy syntax already consistent with theexisting config examples in this file.
A docs discussion (#1270) floated this idea; this PR opens the concrete change for easier review.