CORS issue with file uploading API

First-time Contributor

CORS issue with file uploading API

I'm posting a file to "" from my react application but it throws CORS error.

I added my localhost to the CORS whitelist in configuration section of my box app but that doesn't work too.

Then I deployed my frontend to live server thinking that may be box API is getting issues with local environment. I added the live url to CORS whitelist but no luck with this too.

I've already spent handsome amount of time but getting failed. Kindly assist me in this regard.


I shall be very grateful to you.



Box Employee

Re: CORS issue with file uploading API

Do the upload requests you're making include an `HTTP origin` header? 

For more information, we have a guide on best practices for CORS:

Occasional Contributor

Re: CORS issue with file uploading API

When I try to add an origin: header to my POST, it is rejected as an unsafe header.


What's frustrating to me is that the Box folder API is working fine, it's just the Box upload API which throws this CORS error.