nitro icon indicating copy to clipboard operation
nitro copied to clipboard

`baseURL` is not replaced when forwarding proxy #2708

Open danielroe opened this issue 6 months ago • 0 comments

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


danielroe avatar Jun 26 '25 15:06 danielroe