-
-
Notifications
You must be signed in to change notification settings - Fork 90
fix(core): replace headers.get('cookie') with headers.cookie #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): replace headers.get('cookie') with headers.cookie #347
Conversation
Hi, this problem is blocker of using cookie service for ssr. |
I hope that the mainter can review this PR soon and if everything is ok to make new relase. |
Hi @pavankjadda Sorry to ping you here but it would be great if you could review this. Thanks |
I now understand why this changed. It has to do with the CommonEngine and the AngularNodeAppEngine.
|
Co-authored-by: Daniel Müller <[email protected]>
Co-authored-by: Daniel Müller <[email protected]>
Co-authored-by: Daniel Müller <[email protected]>
|
Yep, my bad — it seems that the cookie property on the headers object is not explicitly declared. One way to avoid the error is by using bracket notation like this.request?.headers['cookie'], or alternatively by extending the type in global.d.ts. However, I believe this is an oversight on Angular's side, and once it's fixed, this.request?.headers.cookie should work as expected. In the meantime, I've submitted another PR using the bracket notation. Feel free to adjust it or explore another approach if needed — just wanted to get something in place since this feature is needed ASAP. Thanks in advance! 🙏 |
Seems to fix #346