-
-
Notifications
You must be signed in to change notification settings - Fork 267
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(router): handle cookie header internally #1276
Conversation
✅ Deploy Preview for analog-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for analog-ng-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
What if they already have a "cookie" header? I think the header should have a unique name at least, such as Is |
I was thinking that the cookie header should only be added if the request URL has the format |
The idea is that if we make a request to, for example, The only cookies this request https://github.com/analogjs/analog/blob/beta/packages%2Frouter%2Fsrc%2Flib%2Froute-config.ts#L71 should have are the server request cookies |
PD: I updated the PR |
@@ -26,5 +28,10 @@ export function provideFileRouter( | |||
multi: true, | |||
useValue: () => updateMetaTagsOnRouteChange(), | |||
}, | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know there was an internal token for adding root interceptor functions. I'd like to use this for the requestContextInterceptor
also, but that's separate from this PR.
I see, that makes sense. We can keep it scoped to start as its only for internal Analog requests. |
PR Checklist
Closes: None.
What is the new behavior?
load
function of.server.ts
files without implementing a custom interceptor.Does this PR introduce a breaking change?
Other information
Very small test:
apps/analog-app/src/app/pages/(home).server.ts
file, add a console.log.apps/analog-app/src/app/app.config.ts
, the console log will print an empty object.What gif best describes this PR or how it makes you feel?