Skip to content

Commit

Permalink
chore: use path: '/' in demo app
Browse files Browse the repository at this point in the history
The default path ('/sverdle') caused the set-cookie header not to be returned from the Azure function.
  • Loading branch information
geoffrich committed Jan 1, 2024
1 parent 1d7c944 commit fb0b2e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/src/routes/sverdle/+page.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const actions = {
game.guesses[i] += key;
}

cookies.set('sverdle', game.toString(), { path: '' });
cookies.set('sverdle', game.toString(), { path: '/' });
},

/**
Expand All @@ -61,10 +61,10 @@ export const actions = {
return fail(400, { badGuess: true });
}

cookies.set('sverdle', game.toString(), { path: '' });
cookies.set('sverdle', game.toString(), { path: '/' });
},

restart: async ({ cookies }) => {
cookies.delete('sverdle', { path: '' });
cookies.delete('sverdle', { path: '/' });
}
};

0 comments on commit fb0b2e4

Please sign in to comment.