devProxy not work
See original GitHub issueEnvironment
- Operating System:
Darwin
- Node Version:
v16.15.1
- Nuxt Version:
3.0.0
- Nitro Version:
1.0.0
- Package Manager:
npm@8.11.0
- 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
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Vue proxy setting does not work - Stack Overflow
I have a Vue project from @vue/cli 3.x. The proxy I defined in package.json based on this article is not working. The destination...
Read more >devServer proxy(in vue.config.js) not working - Get Help
I encountered this problem, too. devServer proxy not working What should i do? vue.config.js exists in root dir of vue project.
Read more >Server Options - Vite
When running Vite on WSL2, file system watching does not work when a file is edited by Windows applications (non-WSL2 process).
Read more >Configuration - ️ Nitro - UnJS
devProxy. Proxy configuration for development server. You can use this option to override development server routes and proxy-pass requests.
Read more >Dev server proxy - Vue.js Developers
What this will do is - any outgoing requests to the dev server which are not recognized - before throwing a 404 it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello, I’m having the same issue without ssr mode.
So with SSR disabled I am not able to use the nitro devProxy?
Before I was using vite’s dev proxy which worked fine with SSR set to false.