HttpCookie myCookie = new HttpCookie("myCookie");
myCookie.HttpOnly = true;
Response.AppendCookie(myCookie);
res.cookie('rememberme','1',{httpOnly: true });
HttpCookie myCookie = );
//...
myCookie.SecurePolicy = CookieSecurePolicy.Always;
Response.AppendCookie(myCookie);
var app = express()
var sess = {
secret: 'keyboard cat',cookie: {}
}
if (app.get('env') === 'production') {
app.set('trust proxy',1) trust first proxy
sess.cookie.secure = true serve secure cookies
}
app.use(session(sess))