Default proxy setting for create-react-app doesn't handle file downloads

Viewed 485

I am developing a web app using create-react-app. I have a back-end server setup, and connect to it by setting the proxy: ${my api host} in package.json. I have some api calls that are supposed to return .xls file downloads. But can't seem to be get it through this default setup.

I changed the proxy setup with Configuring the Proxy Manually doc described in Create-React-App docs.

Now the file downloads work as expected.

I am curious why the defaults package.json proxy setting did not handle my file downloads. Somehow I had a hunch that the default proxy setting was the problem, and solved the issue, but I can't get a grip on why that was the issue.

Can anybody tell me what the underlying problem was?

0 Answers
Related