[PR #7774] [MERGED] fix(expo): construct the new Request to avoid immutable headers error on Cloudflare Workers #7546

Closed
opened 2026-03-13 13:41:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7774
Author: @bytaesu
Created: 2/3/2026
Status: Merged
Merged: 2/3/2026
Merged by: @himself65

Base: canaryHead: 2026-02-04/fix/expo-immutable-headers


📝 Commits (2)

  • b75bad5 fix(expo): construct the new Request to avoid immutable headers error on Cloudflare Workers
  • a1d2407 fix: new Headers

📊 Changes

1 file changed (+6 additions, -2 deletions)

View changed files

📝 packages/expo/src/index.ts (+6 -2)

📄 Description

Note

https://developers.cloudflare.com/workers/examples/modify-request-property

We previously resolved the issue in the user's reproducible repo, but it still occurs when I test it in a Cloudflare Workers environment.

Related to https://github.com/better-auth/better-auth/issues/7014


Summary by cubic

Build a new Request with fresh Headers in the Expo integration so we can set the Origin header on Cloudflare Workers. This avoids the “immutable headers” error and restores compatibility (related to better-auth/better-auth#7014).

Written for commit a1d2407890. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7774 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 2/3/2026 **Status:** ✅ Merged **Merged:** 2/3/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `2026-02-04/fix/expo-immutable-headers` --- ### 📝 Commits (2) - [`b75bad5`](https://github.com/better-auth/better-auth/commit/b75bad5cd7d83a11defb2665cba992b0ed661b55) fix(expo): construct the new Request to avoid immutable headers error on Cloudflare Workers - [`a1d2407`](https://github.com/better-auth/better-auth/commit/a1d2407890e561cb90ac3d5904abd1ff9114804a) fix: new Headers ### 📊 Changes **1 file changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/expo/src/index.ts` (+6 -2) </details> ### 📄 Description > [!NOTE] > https://developers.cloudflare.com/workers/examples/modify-request-property We previously resolved the issue in the user's reproducible repo, but it still occurs when I test it in a Cloudflare Workers environment. Related to https://github.com/better-auth/better-auth/issues/7014 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Build a new Request with fresh Headers in the Expo integration so we can set the Origin header on Cloudflare Workers. This avoids the “immutable headers” error and restores compatibility (related to better-auth/better-auth#7014). <sup>Written for commit a1d2407890e561cb90ac3d5904abd1ff9114804a. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:41:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#7546