Skip to content
Snippets Groups Projects
Commit 907c6eee authored by Raphaël Faure's avatar Raphaël Faure
Browse files

hhtp-proy-middleware

parent 4362174f
Branches
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"browserify-zlib": "^0.2.0",
"http-proxy-middleware": "^2.0.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.4.3",
......@@ -7,6 +7,7 @@
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"browserify-zlib": "^0.2.0",
"http-proxy-middleware": "^2.0.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.4.3",
......@@ -26,7 +27,6 @@
"react-app/jest"
]
},
"proxy": "http://localhost:3001/",
"browserslist": {
"production": [
">0.2%",
......
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function (app) {
app.use(
'/visited_tags',
createProxyMiddleware({
target: 'http://localhost:3001',
changeOrigin: true,
})
);
app.use(
'/to_win',
createProxyMiddleware({
target: 'http://localhost:3001',
changeOrigin: true,
})
);
app.use(
'/new_tag',
createProxyMiddleware({
target: 'http://localhost:3001',
changeOrigin: true,
})
);
};
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment