Skip to content

Commit 062daa4

Browse files
davidjbTimer
authored andcommitted
Minor change to highlight dev proxy behaviour (facebook#3075)
1 parent 41c1978 commit 062daa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ To tell the development server to proxy any unknown requests to your API server
983983
"proxy": "http://localhost:4000",
984984
```
985985

986-
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.
986+
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.
987987

988988
Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development:
989989

0 commit comments

Comments
 (0)