You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
appendAuthHeaders throws on immutable dev-asset responses #308
Title:appendAuthHeaders throws "Can't modify immutable headers" on Vite
dev-asset responses, blanking pages-mode apps with auth enabled
Version:void@0.10.13 (dev server; vite dev via Vite+)
Summary: With defineAuth enabled in a pages-mode app, the dev server
returns 500 for Vite's own asset responses (/@vite/client, /@id/…, /@fs/…, HMR modules) because appendAuthHeaders calls target.set(...) on
a Response whose headers are immutable. Every page renders blank in dev.
Reproduces with zero plugins — a fresh void init + defineAuth with emailAndPassword is enough.
Where:dist/better-auth-shared-*.mjs
js function appendAuthHeaders(target, source) { if (!source) return; source.forEach((value, key) => { if (key.toLowerCase() === "set-cookie") { target.append(key, value); // throws on immutable headers return; } target.set(key, value); // throws on immutable headers }); }
Activity
mdong1909 commentedon Sep 4, 2026
patch example from op
mdong1909 commentedon Sep 7, 2026
fixed in #309