editable todo summary field
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { Agent as HttpAgent } from 'node:http'
|
||||
import { Agent as HttpsAgent } from 'node:https'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { defineConfig, loadEnv, type ProxyOptions } from 'vite'
|
||||
|
||||
@@ -23,6 +25,13 @@ export default defineConfig(({ mode }) => {
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/caldav/, basePath),
|
||||
headers,
|
||||
// The CalDAV server answers every request with `Connection: close`,
|
||||
// but http-proxy's default agent still pools/reuses sockets — that
|
||||
// races with the server closing them and intermittently surfaces as
|
||||
// a 503 (ECONNRESET) here. A fresh connection per request avoids it.
|
||||
agent: target.protocol === 'https:'
|
||||
? new HttpsAgent({ keepAlive: false })
|
||||
: new HttpAgent({ keepAlive: false }),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user