Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
cookie is setting to 1 hours instead of passed maxAge value

In my file I've got a cookie that always sets to 1 hour by default even if I define maxAge 12 seconds

 res.cookie("my-cookies", req.body.id_token, {maxAge: 12000, httpOnly: false});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

i dont know about gatsby but this also works, first use cookieParser as middleware

const cookieParser = require("cookie-parser")
app.use(cookieParser)

and in your routes use this:

res.cookie("my-cookies", req.body.id_token, {
      expires: new Date() + 12000
    });

also if the above solution didn't work visit this site

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!