When redirecting, is it possible to attach a cookie?

#1

Using workers is it possible to attach a cookie while using Response.redirect(…url…, 301). Currently I have some routes that are always redirecting, but I also want to attach the CF-IPCountry in a cookie along with the response redirect. Also, the subdomains are different for the routes, if that matters.

0 Likes

#2

That should be easily possible by simply adding a Set-Cookie header to the response header.

0 Likes