Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I have nodejs application cookies working fine on localhost but when i deploy it on nginx live server cookie not set on client side. Please anyone to assist me on this matter. Below is the code am using to set up express session with cookie.
//express-session configurations
const storeOptions = {
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASS,
database: process.env.DB_NAME,
clearExpired: true,
}; //db store
const sessionStore = new MySQLStore(storeOptions);
const sessionOptions = {
key: process.env.SESSION_KEY,
secret: process.env.SESSION_SECRET,
resave: false,
saveUninitialized: false,
store: sessionStore,
cookie: {
maxAge: 1000 * 60 * 60 * 12, //12hours
},
};
if (app.get("env") === "production") {
app.set("trust proxy", 1); // trust first proxy
sessionOptions.cookie.secure = true; // serve secure cookies
}
app.use(session(sessionOptions));
app.use(passport.initialize()); //initialize passport
app.use(passport.session()); //initialize session with passport
ebeecroft
68aa2215160846bca0a00f952c5fdc
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e