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

137
Views
res.cookie works on Localhost and Postman but doesn't work on production

res.cookie set browser cookie on localhost but doesn't set browser cookie after production and still I can find set-cookie in response header. I don't see any cors problem. I use Digitalocean App to deploy my node server.

Here is my code -

res.cookie('ckstate', 'logged', {
                httpOnly: false, 
                sameSite: router.get("env") === "development" ? true : "none", 
                secure: router.get("env") === "development" ? false : true
            })
            .status(200)
            .json(others)

Here is the POST request from my React client -

await axios.post(API_URL, user, { withCredentials: true })
        .then(res => {
            Auth.refreshAuth();
            history.push('/');
        })
        .catch(err => {
            console.log(err)
            setMessage('Wrong Credentials. Try again.');
        })

Here is the Response Header

about 4 years ago · Juan Pablo Isaza
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!