nitro
nitro copied to clipboard
`baseURL` is not replaced when forwarding proxy #2708
Environment
Nitro v2
Reproduction
https://stackblitz.com/edit/github-fmxubecd
Describe the bug
With a baseURL + proxy, the base is included in the proxied request:
export default defineNitroConfig({
baseURL: '/app',
routeRules: {
'/api/v1/**': { proxy: { to: 'https://dummyjson.com/**' } },
},
});
So /app/api/v1/quotes/random does not correctly proxy to http://dummyjson.com/quotes/random.
previously reported without a reproduction in https://github.com/nitrojs/nitro/issues/2708
Additional context
No response
Logs