Skip to content

Commit bda41ce

Browse files
Ani1357svcAPLBot
andauthored
revert: http-proxy-middleware changes (#619)
* Revert "fix: http proxy middleware (#615)" This reverts commit f1540c0. * Revert "chore: upgrade http-proxy-middleware (#616)" This reverts commit cffe915. --------- Co-authored-by: svcAPLBot <174728082+svcAPLBot@users.noreply.github.com>
1 parent 7cf5bc9 commit bda41ce

File tree

3 files changed

+18
-37
lines changed

3 files changed

+18
-37
lines changed

package-lock.json

Lines changed: 13 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"dotenv-cli": "4.1.1",
3434
"framer-motion": "^6.2.9",
3535
"generate-download-link": "1.0.1",
36-
"http-proxy-middleware": "3.0.5",
36+
"http-proxy-middleware": "0.21.0",
3737
"i18next": "19.9.2",
3838
"i18next-browser-languagedetector": "6.1.4",
3939
"i18next-http-backend": "3.0.2",

src/setupProxy.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
1-
const { createProxyMiddleware } = require('http-proxy-middleware')
1+
const proxy = require('http-proxy-middleware')
22

33
module.exports = function (app) {
44
app.use(
5-
'/api/ws',
6-
createProxyMiddleware({
5+
proxy('/api/ws', {
76
target: 'ws://localhost:8080',
87
ws: true,
98
changeOrigin: true,
109
logLevel: 'debug',
1110
pathRewrite: { '^/api/ws': '/ws' },
1211
}),
13-
)
14-
15-
app.use(
16-
'/api',
17-
createProxyMiddleware({
12+
proxy('/api', {
1813
target: 'http://localhost:8080',
1914
pathRewrite: { '^/api/': '/' },
2015
}),
21-
)
22-
23-
app.use(
24-
'/trans',
25-
createProxyMiddleware({
16+
proxy('/trans', {
2617
target: 'http://localhost:3333',
2718
}),
2819
)

0 commit comments

Comments
 (0)