Set cookies with path in loaders #9710
-
export const loader = () => {
// code here
return json(
{},
{
headers: [
[
'Set-Cookie',
`routeNested=routeNestedValue; domain=${domain}; path='/'; httpOnly=true; secure=true;`,
],
],
},
);
}; Though I'm setting the cookies with path as For example if the
then the cookie is set with Is this expected or I'm doing something wrong here. Could anyone please guide me how to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Sure, that's a copy / paste mistake here sorry for that. Even without these |
Beta Was this translation helpful? Give feedback.
-
I saw that both in MDN and in my apps the attributes you add to a cookie like path are all capitalized, like Path=/ also without |
Beta Was this translation helpful? Give feedback.
I saw that both in MDN and in my apps the attributes you add to a cookie like path are all capitalized, like Path=/ also without
'
, have you tried that?