Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/server-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ function createServer_p(configFilePath, options) {
let useCompression = true;

var clientSessionMiddleware = client_sessions({
secret: crypto.randomBytes(16).toString('hex')
secret: crypto.randomBytes(16).toString('hex'),
// Mitigate CSRF by preventing the session cookie from being sent along
// with cross-site requests.
cookie: {
sameSite: 'lax'
}
});

// Setup a placeholder middleware function until we can create one after
Expand Down