From c1821e45d9fc3c98f3a63463de362543b3770378 Mon Sep 17 00:00:00 2001 From: David Beitey Date: Wed, 6 Sep 2017 15:49:43 +1000 Subject: [PATCH] Minor change to highlight dev proxy behaviour --- packages/react-scripts/template/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index c55ccdf949f..1f6d3467706 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -983,7 +983,7 @@ To tell the development server to proxy any unknown requests to your API server "proxy": "http://localhost:4000", ``` -This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. The development server will only attempt to send requests without a `text/html` accept header to the proxy. +This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. The development server will **only** attempt to send requests without `text/html` in its `Accept` header to the proxy. Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development: