Skip to content

Commit 30c86f5

Browse files
authored
Merge pull request #1074 from appwrite/fix-cli-prevent-session-cookie-wipe
fix(cli): prevent session cookie from being wiped
2 parents 5369528 + 7c8f4d9 commit 30c86f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

templates/cli/lib/client.js.twig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ class Client {
171171

172172
let cookies = response.headers.getSetCookie();
173173
if (cookies && cookies.length > 0) {
174-
globalConfig.setCookie(cookies.join(";"));
174+
for (const cookie of cookies) {
175+
if (cookie.startsWith('a_session_console=')) {
176+
globalConfig.setCookie(cookie);
177+
}
178+
}
175179
}
176180

177181
const text = await response.text();

0 commit comments

Comments
 (0)