-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[馃悶] Cookie not set when using $server
#5951
Comments
the problem is with setting headers and streaming. we need to set the headers right away which is why this is fine with useVisibleTask$ since the response and headers are set at the same time |
ok I think I got a fix or at least something that will mostly work. so long as the cookie is set before the first write to stream |
so the correct solution are |
please use |
@PatrickJS and how would I set cookie in plugin that executes before If Example repo is provided and I wan't to do simple thing - set cookie when this method is called. |
here is a summary of my response on discord
|
@PatrickJS from my point of view In all of this cases we have Changing types or creating eslint rules seems not to be possible as it depends on where this method is used, so I agree that it seems just documenting this for now is the best option. |
Describe the bug
Cookie is not set when using
server$
withuseTask$
Note: same example with
useVisibleTask
insteaduseTask
works fineReproduction
https://github.com/ziimakc/qwik-cookie-not-set
Steps to reproduce
The text was updated successfully, but these errors were encountered: