loader fn not setting response headers like in 1.131.43
The following was working before I upgraded to 1.133.13. The expectation is that upon navigating to this route, the server should set the session cookie in the response headers:
In 1.133.13 I changed this bit and it's no longer working:
3 Replies
equal-aqua•2mo ago
setheaders should be setResponseHeaders
rare-sapphireOP•2mo ago
@Manuel Schiller yeah. i mentioned i changed to that and it's no longer working
i kind of feel the response headers from the server fn are not being bubbled up by the loader callback, if that makes sense
@Manuel Schiller i feel there's an issue with setResponseHeaders. I tried calling the server fn directly in a useEffect, and the response header is not being set either:
however, if i return a raw response like this, it does work as expected:
@Manuel Schiller
setResponseHeader singular does work, however.
i think i found the issue. i'll work on a PRrare-sapphireOP•2mo ago
GitHub
fix(start-server-core): use Headers.entries() to iterate headers co...
Summary
This PR fixes a critical bug in setResponseHeaders() where no headers were being set at all.
The Bug
The previous code used Object.entries(headers) to iterate over a Headers object:
for (co...