Skip to content

web: Documentation for cross_origin_protection - #3933

Merged
bdarnell merged 3 commits into
tornadoweb:masterfrom
bdarnell:claude/project-thread-fa7dii
Nov 25, 2026
Merged

bdarnell merged 3 commits into
tornadoweb:masterfrom
bdarnell:claude/project-thread-fa7dii

Conversation

@bdarnell

Copy link
Copy Markdown
Member

No description provided.

Now that cross_origin_protection is on by default, the warning logged
for a rejected request is the first thing an operator will see. Include
the Host header the Origin was compared with (which shows when a proxy
rewrites Host), and suggest the trusted_origins setting. Don't suggest it
for the opaque origin "null", since trusting it would trust every
sandboxed iframe and no-referrer page, or when there is no Origin at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VamvWofQiQ7xrTXqMkEWib
…that need it configured

Update the security guide and the setting's description for the 6.7
default, add a section on the deployments that are rejected unless
configured (CORS clients, sibling subdomains, cross-site sign-in
callbacks, opaque origins, plain-HTTP proxies that rewrite Host, and
FallbackHandler), and add release notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VamvWofQiQ7xrTXqMkEWib
Any page can send "Origin: null" by submitting a form from a sandboxed
iframe, so listing it in trusted_origins trusts every origin. There is
no safe reason to list it: a callback that legitimately arrives with
Origin: null must be allowed by that handler's check_trusted_origin,
which must also verify the callback. Raise ValueError when the
Application is created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VamvWofQiQ7xrTXqMkEWib
@bdarnell
bdarnell merged commit 749ab20 into tornadoweb:master Nov 25, 2026
23 checks passed
@bdarnell
bdarnell deleted the claude/project-thread-fa7dii branch November 25, 2026 03:21
pawciobiel pushed a commit to pawciobiel/tornado that referenced this pull request Nov 25, 2026
The hyphenated forms 're-use' and 're-usable' are listed variants in some
dictionaries but the Oxford spelling treats 'reuse' / 'reusable' as the
canonical unhyphenated form. This change aligns the docstrings/comments
with the rest of the Python ecosystem and mirrors the same kind of fix
already shipped for openai/openai-python tornadoweb#3933 and
anthropics/anthropic-sdk-python tornadoweb#1945 this week.

2 files / 2 insertions / 2 deletions. No behavior change.
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.

2 participants