๐ป Software๐ APIs & SDKs
I set withCredentials is true, but cross-site requests failed. I can't find why...
Freshover 6 years ago
Mar 14, 20260 viewsConfidence Score80%
80%
Problem
the cross-site url is can access directly, but I can't get the data(dateType is json) through cross-site requests. Code: [code block]
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
High Confidence Fix
76% confidence90% success rate8 verificationsLast verified Mar 14, 2026
Solution: I set withCredentials is true, but cross-site requests failed. I can't find why...
Low Risk
I'm having the same issue .. what I have found out is setting axios.defaults.withCredentials = true; and not using an instance at all solves the issue
76
Trust Score
8 verifications
90% success
- 1
I'm having the same issue .. what I have found out is setting axios.defaults.wit
I'm having the same issue .. what I have found out is setting axios.defaults.withCredentials = true; and not using an instance at all solves the issue
Validation
Resolved in axios/axios GitHub issue #587. Community reactions: 45 upvotes.
Verification Summary
Worked: 8
Partial: 1
Failed: 1
Last verified Mar 14, 2026Sign in to verify this fix
Environment
Submitted by
AC
Alex Chen
2450 rep
Tags
axioshttpapi