Thanks for the suggestion! We added it in the 4.14.0 release :)
Here is an example:
$ npm i express
[email protected] node_modules\express
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])
$ cat app.js
var express = require('express')
var app = express()
app.get('/', function (req, res) {
res.cookie('foo', 'bar', {
sameSite: true
})
res.end()
})
app.listen(4000)
$ node app.js &
[1] 10804
$ curl -Is http://127.0.0.1:4000
HTTP/1.1 200 OK
X-Powered-By: Express
Set-Cookie: foo=bar; Path=/; SameSite=Strict
Date: Wed, 05 Oct 2016 13:24:13 GMT
Connection: keep-alive
@dougwilson Support for sameSite is not mentioned in the docs afaict. I discovered it's existence by accident when reading through the code of the cookie NPM package but could not find it in the docs... A Google search then lead me here.
Hi @Download sorry we missed documenting it. Please open issues with the website at https://github.com/expressjs/expressjs.com
SameSite=None is added in [email protected] and express depends on an exact version of [email protected], which is out-dated now.
Hi @Nandiin you are using an outdated Express. Please upgrade to Express 4.17.0 or higher: http://expressjs.com/en/changelog/4x.html#4.17.0
Most helpful comment
Thanks for the suggestion! We added it in the 4.14.0 release :)
Here is an example: