Cookie not set in pages deployed, but working with local wrangler
Hi Guys,
I see that there seem to be issue with setting cookies for nextJS pages on cloudflare. Can any kind soul provide me with the reference on how to allow cookie to be set on the deployed pages?
Below is a snippet of my code to set the cookie:
1 Reply
Ok, this issue has been resolved. It seems like there was a confusion between preview and production. The relevant secrets were not set for preview build and therefore the cookie wasn't generated.
Both
response.cookies.set() and headers.append() works in setting the cookies