Skip to content

Commit fe3abbf

Browse files
authored
Api proxy doesn't seem to be working for me
werein/react#56
1 parent 656a04e commit fe3abbf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

webpack.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ module.exports = {
7272
devServer: {
7373
historyApiFallback: true,
7474
proxy: {
75-
'/api*': 'http://localhost:8181'
75+
'/api/*': {
76+
target: 'http://localhost:8181',
77+
changeOrigin: true,
78+
pathRewrite: {
79+
'^/api': ''
80+
}
7681
}
7782
}
83+
}
7884
};

0 commit comments

Comments
 (0)