Replies: 1 comment
-
|
Facing same problem here. It seems |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have tried to search before to ask the question, but I didn't find what I was looking so let me ask.
I tried the HMP
v3.0.0-beta2. I have a working solution withv2.0.6but it is not working with v3 and I don't understand why. I have tried multiple things but without success.Here is my code:
I understand that something has changed with the
targetoption where the path should be added in thetargetoption but I'm not sure how this apply to therouteroption when we use such a mapping object.Some of my try:
const proxyTable = { - "mainnet.localhost:3000": "https://mysite.come", + "mainnet.localhost:3000/v1": "https://mysite.come", }; const proxyTable = { - "mainnet.localhost:3000": "https://mysite.come", + "mainnet.localhost:3000/v1": "https://mysite.come/v1", }; - server.middlewares.use("/v1", proxy); + server.middlewares.use(proxy);Most of the time I get this error:
7:40:49 AM [vite] Internal server error: Must provide a proper URL as target at ProxyServer.<anonymous> (/Users/ganbin/Documents/app/node_modules/http-proxy/lib/http-proxy/index.js:69:35) at HttpProxyMiddleware.middleware (/Users/ganbin/Documents/app/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js:23:32) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)But some of my tries just don't show any error but the routing is not working.
If I use
legacyCreateProxyMiddlewareit is working.Any hint?
Beta Was this translation helpful? Give feedback.
All reactions