Skip to content
Discussion options

You must be logged in to vote

Got it working with Advanced Proxy.
My issue was in understanding how the initial path worked.
You HAVE to strip it out if you don't want it on the other side.

This worked for me...

developMiddleware: (app) => {
  app.use(
    '/api',
    createProxyMiddleware({
      target: 'https://6005e7693698a80017de1170.mockapi.io',
      changeOrigin: true,
      pathRewrite: { '^/api': '/' },
      logLevel: 'debug',
    })
  )
},

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by iDVB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant