wobsoriano / nuxt-proxy

Http-proxy middleware for Nuxt 3.
MIT License
92 stars 9 forks source link

Not working with Nuxt 3.1.1: Every url goes through the proxy `/ -> PROXY` #19

Closed DaniGTA closed 1 year ago

DaniGTA commented 1 year ago

I have Nuxt 3.1.1 with nuxt-proxy 0.3.12

part of nuxt config:

  proxy: {
    options: [
      {
        target: "http://" + PROXY,
        changeOrigin: true,
        pathFilter: ["/api/"],
        pathRewrite: {
          "^/api/": "",
        },
      },
      {
        target: "http://" + PROXY,
        changeOrigin: true,
        ws: true,
        pathFilter: ["/socket.io"],
      },
    ],
  },

Log output:

[HPM] Proxy created: /  -> http://127.0.0.1:3030                                                                                                      
[HPM] Proxy rewrite rule created: "^/api" ~> ""                                                                                                        
[HPM] Proxy created: /  -> http://127.0.0.1:3030  

Every url goes through the proxy

cwirz commented 1 year ago

@DaniGTA still have this issue with nuxt@3.3.1