Skip to content
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

[refactor] Refactor worker rpc #2645

Merged
merged 2 commits into from
Sep 8, 2023
Merged

[refactor] Refactor worker rpc #2645

merged 2 commits into from
Sep 8, 2023

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Sep 7, 2023

Generalize and align all RPC mechanisms between worker threads. Extracted from #2644 to make it easier to communicate with the function runtime worker.

@Janpot Janpot added the core Infrastructure work going on behind the scenes label Sep 7, 2023
@Janpot Janpot marked this pull request as ready for review September 7, 2023 16:36
@Janpot Janpot requested a review from a team September 7, 2023 16:36
@@ -18,7 +18,7 @@ export function createServerContext(req: IncomingMessage, res: ServerResponse):
return {
cookies,
setCookie(name, value) {
res.setHeader('Set-Cookie', cookie.serialize(name, value));
res.setHeader('Set-Cookie', cookie.serialize(name, value, { path: '/' }));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be possible to set options like httpOnly, secure and maxAge?
Or should we set any of those options for cookies to be more secure for authentication, for example?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, but it's not within the scope of this PR.

Copy link
Member

@apedroferreira apedroferreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a thought about cookies.

@Janpot Janpot merged commit ae88037 into mui:master Sep 8, 2023
@Janpot Janpot deleted the worker-rpc branch September 8, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants