mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(api): CSRF-token should not be httpOnly (#55365)
This commit is contained in:
committed by
GitHub
parent
464dbf6a28
commit
669b4908b1
+4
-1
@@ -140,7 +140,10 @@ export const build = async (
|
||||
const token = reply.generateCsrf();
|
||||
void reply.setCookie('csrf_token', token, {
|
||||
sameSite: 'strict',
|
||||
signed: false
|
||||
signed: false,
|
||||
// it needs to be read by the client, so that it can be sent in the
|
||||
// header of the next request:
|
||||
httpOnly: false
|
||||
});
|
||||
}
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user