Skip to content

Commit fb0b2e4

Browse files
committed
chore: use path: '/' in demo app
The default path ('/sverdle') caused the set-cookie header not to be returned from the Azure function.
1 parent 1d7c944 commit fb0b2e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

demo/src/routes/sverdle/+page.server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const actions = {
4444
game.guesses[i] += key;
4545
}
4646

47-
cookies.set('sverdle', game.toString(), { path: '' });
47+
cookies.set('sverdle', game.toString(), { path: '/' });
4848
},
4949

5050
/**
@@ -61,10 +61,10 @@ export const actions = {
6161
return fail(400, { badGuess: true });
6262
}
6363

64-
cookies.set('sverdle', game.toString(), { path: '' });
64+
cookies.set('sverdle', game.toString(), { path: '/' });
6565
},
6666

6767
restart: async ({ cookies }) => {
68-
cookies.delete('sverdle', { path: '' });
68+
cookies.delete('sverdle', { path: '/' });
6969
}
7070
};

0 commit comments

Comments
 (0)