fix: proper handling of http-proxy error conditions

This commit is contained in:
Ben Allfree 2023-01-23 15:53:32 +00:00
parent f9ff735e7c
commit ac6e1e47e4
2 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,9 @@ export const proxyService = mkSingleton(async (config: ProxyServiceConfig) => {
const { coreInternalUrl } = config
const proxy = httpProxy.createProxyServer({})
proxy.on('error', (err, req, res, target) => {
warn(`Proxy error ${err} on ${req.url} (${req.headers.host})`)
})
const server = createServer(async (req, res) => {
dbg(`Incoming request ${req.headers.host}/${req.url}`)

View File

@ -139,6 +139,7 @@ If all goes well:
- Fix: requests for instances not ending in `pockethost.io` now rejected
- Fix: realtime logging API requests no longer intercepted by PocketBase
- Fix: potential timer memory leak
- Fix: proper handling of http-proxy error conditions
- Chore: various internal error trapping and logging
**0.6.1**