framework
framework copied to clipboard
devProxy not work
Environment
- Operating System:
Darwin - Node Version:
v16.15.1 - Nuxt Version:
3.0.0 - Nitro Version:
1.0.0 - Package Manager:
[email protected] - Builder:
vite - User Config:
runtimeConfig,ssr,nitro - Runtime Modules:
- - Build Modules:
-
Reproduction
https://github.com/KaiEi1020/nuxt-app.git
Describe the bug
i'm use ssr mode。and i want proxy client and sever side request to another server。here is my config of nuxt.config.ts,but now it not work。and if i want Authorization for my request both client and server side only in dev mode?
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
runtimeConfig: {
apiSecre: '125',
public: {
apiBase: '/api/2345ty'
}
},
ssr: true,
nitro: {
devProxy: {
'/api/itable': {
target: 'http://idata-staging.cai-inc.com',
changeOrigin: true,
},
}
},
})
Additional context
No response
Logs
No response