Skip to content
An example project showing how to set up react to work with cross origin resources in development
JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

This is an example project for setting up react to handle cross origin resource sharing (CORS) while in development. The project accesses the latest XKCD comic from the endpoint

This request would normally be blocked by the browser, however using the proxy setting within the package.json tells react to setup a proxy server that allows us to access resources on different origins. Note, this only works in development (using npm start) more details can be found within the react docs.

You can’t perform that action at this time.