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

335
Views
Cookie not set in request headers in React Js

I have created a cookie using the JS-Cookie package and it is saved in my browser, but the cookie is not set in my request header and is not sent to the server.

I use Axios.

My cookie example:

Cookies.set("myCookie", JSON.stringify(myData), {
      expires: 2,
      sameSite: "none",
      secure: true,
    });

Example of my Axios code:


axios.get("mayUrl", { withCredentials: true,});


I can send a cookie to React from the backend, but when I create a cookie in React, I can't send it to the backend. It seems that the browser ignores my cookie.

Thank you to those who help me

about 4 years ago · Santiago Gelvez
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!