react-axios fails Preflight CORS, while axios in react passes
See original GitHub issue react-axios fails CORS despite
react-axios fails CORS despite access-control-allow-origin: * on the server, while running axios in react passes.
Here are the http headers:
curl -v https://jsonplaceholder.typicode.com/users
> GET /users HTTP/2                                                   
> Host: jsonplaceholder.typicode.com                                                                                                         
> user-agent: curl/7.68.0                                             
> accept: */*                                                         
< content-type: application/json; charset=utf-8                                                                                              
< x-powered-by: Express                                               
< x-ratelimit-limit: 1000                                             
< x-ratelimit-remaining: 998                                          
< x-ratelimit-reset: 1645868764                                       
< vary: Origin, Accept-Encoding                                       
< access-control-allow-credentials: true                                                                                                     
< cache-control: max-age=43200                                        
< pragma: no-cache                                                    
< expires: -1                      
< x-content-type-options: nosniff
curl -v https://bible-api.com/john%203:16
> GET /john%203:16 HTTP/2
> Host: bible-api.com
> user-agent: curl/7.68.0
> accept: */*
< HTTP/2 200 
< server: nginx
< date: Fri, 03 Jun 2022 16:07:43 GMT
< content-type: application/json;charset=utf-8
< content-length: 493
< access-control-allow-origin: *
< access-control-allow-methods: OPTIONS
< x-content-type-options: nosniff
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
 Top Results From Across the Web
Top Results From Across the Web
Axios having CORS issue - Stack Overflow
This is happening because of restrict-origin-when-cross-origin policy.Browser sends a pre-flight request to know whom the API server wants to ...
Read more >Request to api from axios (cross domain) (CORS) error
I'm try to fetch data from bank api with AXIOS and heve an error. ... Response to preflight request doesn't pass access control...
Read more >Getting 'Cross-Origin Request Blocked' on a GET request #853
I have updated my code to route the request through a proxy: axios.get('https://a.4cdn.org/a/threads.json', { headers: { 'Access-Control ...
Read more >axios has been blocked by cors policy - You.com
axios has been blocked by cors policy: response to preflight request doesn't pass access control check: no 'access-control-allow-origin' header is present ...
Read more >Cross-origin Errors - React
Cross-origin Errors. Note: The following section applies only to the development mode of React. Error handling in production mode is done with regular ......
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

Ok, release v2.0.6 is out now and ready for use.
https://github.com/sheaivey/react-axios/releases/tag/v2.0.6
Oh! I thought that fix was in the latest release from a year ago. I’ll get it pushed out today. Thanks for clarifying.