Environment
"nuxt": "^4.0.3" -> "nitropack": "2.12.4" -> "httpxy": "^0.1.7"
node v20.18.3
npm 11.2.0
Reproduction
...
nitro: {
// routeRules: {
// '/api/**': {
// proxy: "http://localhost:33001/api"+ '/**', // https://nitro.build/guide/routing#route-rules
// }
// },
devProxy: {
'/api': {
target: "http://localhost:33001/api",
changeOrigin: true,
secure: false,
timeout: 0,
proxyTimeout: 0,
}
}
}
Describe the bug
Hello there, Im trying to use a SSE connection with the nitro proxy:
...
nitro: {
// routeRules: {
// '/api/**': {
// proxy: "http://localhost:33001/api"+ '/**', // https://nitro.build/guide/routing#route-rules
// }
// },
devProxy: {
'/api': {
target: "http://localhost:33001/api",
changeOrigin: true,
secure: false,
timeout: 0,
proxyTimeout: 0,
}
}
}
The proxy works fine for normal HTTP requests and even for SSE. BUT when the server (my custom backend) which provides the SSE endpoint turns down the stream / I turn off the server, the client doesn't get the notification of the closed stream and still thinks the stream is good.
I tested without the proxy, and it worked fine, both routeRules and devProxy doesn't work.
In nitroApp.hooks.hook('error'...) I only get a 500 terminated when cutting off the backend.
Additional context
No response
Logs
Environment
"nuxt": "^4.0.3" -> "nitropack": "2.12.4" -> "httpxy": "^0.1.7"node v20.18.3npm 11.2.0Reproduction
Describe the bug
Hello there, Im trying to use a SSE connection with the nitro proxy:
The proxy works fine for normal HTTP requests and even for SSE. BUT when the server (my custom backend) which provides the SSE endpoint turns down the stream / I turn off the server, the client doesn't get the notification of the closed stream and still thinks the stream is good.
I tested without the proxy, and it worked fine, both
routeRulesanddevProxydoesn't work.In
nitroApp.hooks.hook('error'...)I only get a500 terminatedwhen cutting off the backend.Additional context
No response
Logs