Commit 685c5da
committed
fix(@angular/ssr): preserve response headers during redirect
Previously, when a redirect was triggered, any custom headers (such as cookies or cache control) configured on the RESPONSE_INIT object by components or guards were lost because the redirect response was created with the default headers only.
This commit updates the redirect response creation in AngularServerApp to merge the custom headers from responseInit.headers into the redirect response headers, ensuring that cookies and other custom headers are preserved.
Closes angular#334731 parent 010cef6 commit 685c5da
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
357 | 361 | | |
358 | 362 | | |
359 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
| 332 | + | |
329 | 333 | | |
330 | 334 | | |
331 | 335 | | |
| |||
0 commit comments