FG
๐Ÿ”Œ APIs & SDKs

Can not send cookie back from client, tried many ways

Freshover 1 year ago
Mar 14, 20260 views
Confidence Score75%
75%

Problem

Summary I'm new user from nodejs (expressjs) and axios too and I have a problem. I set cookie from nodejs server with: [code block] [code block] I can see response cookie from browser but in storage I can not see. I use res.header do the same, nothing happen. httpOnly: false does not work. And in client I try: [code block] I can not find other ways to do this, every result I got in google do this but I dont know why that not working for me. With Postman it automatic send cookie every request. Please help me! Environment - API: http://localhost:5000 - Front end: http://localhost:2000 - Axios Version: 0.27.2 - Browser: Chrome 101.0.4951.64 (Official Build) (64-bit) - Node.js Version: v12.13.0 - OS: Ubuntu 20.4 - Additional Library Versions: Reactjs 17.0.2

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: Can not send cookie back from client, tried many ways

Low Risk

Yes, it is not working. Cookie is set but value is empty... [Edit]: Ok it is working. In my case I forgot to add "withCredentials: true" also to login request. After that everything started to work.

74

Trust Score

6 verifications

100% success
  1. 1

    Yes, it is not working.

    Cookie is set but value is empty...

  2. 2

    Step 2

    Ok it is working. In my case I forgot to add "withCredentials: true" also to login request. After that everything started to work.

Validation

Resolved in axios/axios GitHub issue #4907. Community reactions: 28 upvotes.

Verification Summary

Worked: 6
Partial: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

axioshttpapi