Skip to content

Return 400 response on failed origin checks#14737

Merged
brophdawg11 merged 2 commits intodevfrom
brophdawg11/origin-check-400
Jan 20, 2026
Merged

Return 400 response on failed origin checks#14737
brophdawg11 merged 2 commits intodevfrom
brophdawg11/origin-check-400

Conversation

@brophdawg11
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jan 20, 2026

🦋 Changeset detected

Latest commit: 5895b22

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
react-router Patch
@react-router/architect Patch
@react-router/cloudflare Patch
@react-router/dev Patch
react-router-dom Patch
@react-router/express Patch
@react-router/node Patch
@react-router/serve Patch
@react-router/fs-routes Patch
@react-router/remix-routes-option-adapter Patch
create-react-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brophdawg11 brophdawg11 merged commit 3126264 into dev Jan 20, 2026
6 checks passed
@brophdawg11 brophdawg11 deleted the brophdawg11/origin-check-400 branch January 20, 2026 20:21
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 7.13.0-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 7.13.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

edmundhung pushed a commit to edmundhung/react-router that referenced this pull request Jan 27, 2026
@jestersoftware
Copy link

This change seems to coincide with my seeing "400 (Bad Request)" errors upon form submit -> POST to a route / action. I haven't seen this error before; the functionality has been working previously; I cannot replicate locally; it only happens in my production domain. I tried to google what react-router is doing with regards to "failed origin checks" but came up empty so far. Any pointers appreciated, thank you.

  • Jesse

@brophdawg11
Copy link
Contributor Author

This was a change of the status code for the error from the CSRF added check in 7.12.0. Sounds like you might be submitting to a UI route from an external origin? If so, you would need to add that to allowedActionOrigins

@jestersoftware
Copy link

Ok I see now the history #14708. Just WOW. Extremely unacceptable. I will never use r-r again for another project. And no, I'm not - I'm just using a reverse proxy server like millions of others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants