nuxt 3 - Dynamic Proxy when an error throw

67 Views Asked by At

when my application generates an error, I need to proxy this request to an external application (WordPress) I'm looking for a solution to set a dynamic proxy in nuxt, but couldn't find anything.

An example to support my request: in my application I have /(index) /city and /city/:slug already defined in my WordPress I have all other routes like /city/street/:id /legal-notice and 404 page

I want nuxt to proxy WordPress on all routes except / (index) / city and / city /: slug(which responds correctly)

All the solutions I found are to set a static proxy (like routeRules from nitro)

Any ideas here?

0

There are 0 best solutions below