Use react-scripts proxy for development
Setting the `defaultDevConfig.url` to use the default port and proxying requests via the react-scripts proxy overcomes CORS issues and reduces friction for ui contributions
This commit is contained in:
parent
66ae74f830
commit
ce056faed8
|
|
@ -3,6 +3,7 @@
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": ".",
|
"homepage": ".",
|
||||||
|
"proxy": "http://localhost:80",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@material-ui/core": "^4.4.3",
|
"@material-ui/core": "^4.4.3",
|
||||||
"@material-ui/icons": "^4.4.3",
|
"@material-ui/icons": "^4.4.3",
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import {PluginStore} from './plugin/PluginStore';
|
||||||
import {registerReactions} from './reactions';
|
import {registerReactions} from './reactions';
|
||||||
|
|
||||||
const defaultDevConfig = {
|
const defaultDevConfig = {
|
||||||
url: 'http://localhost:80/',
|
url: 'http://localhost:3000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
const {port, hostname, protocol, pathname} = window.location;
|
const {port, hostname, protocol, pathname} = window.location;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue