HTTP Proxy for Nuxt โ powered by h3-proxy
Seamlessly proxy API requests in both development and production environments. No more http-proxy-middleware compatibility issues.
Proxy to different backends โ each with its own rules, rewrites, and headers.
Strip or transform URL prefixes before forwarding requests upstream.
Inject custom auth tokens or metadata via configureProxyRequest.
Advanced path matching with function-based pathFilter and method checks.
Proxied: /api/users/** โ jsonplaceholder.typicode.com/users/**
ย ยทย Rule: pathRewrite ^/api โ ''
Proxied: /api/posts/** โ jsonplaceholder.typicode.com/posts/**
ย ยทย Demonstrates multiple proxy targets
Proxied: /api/echo/** โ httpbin.org/anything
ย ยทย Demonstrates configureProxyRequest with custom headers:
X-Proxy-Auth, X-Request-Source, X-Proxy-Version
Proxied: /api/filter/** โ httpbin.org/anything
ย ยทย Demonstrates function-based pathFilter โ
only proxies GET requests matching /api/filter/.*
Defined in playground/nuxt.config.ts via the proxy config key
| Target | https://jsonplaceholder.typicode.com |
| pathFilter | ['/api/users/**'] |
| pathRewrite | { '^/api': '' } |
| Target | https://jsonplaceholder.typicode.com |
| pathFilter | ['/api/posts/**'] |
| pathRewrite | { '^/api': '' } |
| Target | https://httpbin.org |
| pathFilter | ['/api/echo/**'] |
| pathRewrite | { '^/api/echo': '/anything' } |
| configureProxyRequest | Active โ injects custom headers |
| Target | https://httpbin.org |
| pathFilter | function(path, req) { ... } |
| pathRewrite | { '^/api/filter': '/anything' } |
| configureProxyRequest | Active โ injects custom headers |