Skip to content

Commit

Permalink
Quiet
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent99 committed Jan 19, 2024
1 parent 71b52c7 commit 2642ab6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/utils/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function createProxy(api: string, strip = 0) {
proxyReq.setHeader('x-api-host', req.headers.host || '')
proxyReq.setHeader('x-forwarded-proto', 'https')

console.info(`[${ req.headers.reqid }] Proxy onProxyReq`, proxyReq.path, JSON.stringify(proxyReq.getHeaders()))
// console.info(`[${ req.headers.reqid }] Proxy onProxyReq`, proxyReq.path, JSON.stringify(proxyReq.getHeaders()))
},

onProxyReqWs(proxyReq, req) {
Expand All @@ -69,15 +69,15 @@ function createProxy(api: string, strip = 0) {
proxyReq.setHeader('x-api-host', req.headers.host || '')
proxyReq.setHeader('x-forwarded-proto', 'https')

console.info(`[${ req.headers.reqid }] Proxy onProxyReqWs`, proxyReq.path, JSON.stringify(proxyReq.getHeaders()))
// console.info(`[${ req.headers.reqid }] Proxy onProxyReqWs`, proxyReq.path, JSON.stringify(proxyReq.getHeaders()))
},

onProxyRes(proxyRes, req, res) {
if (isDev) {
proxyRes.headers['X-Frame-Options'] = 'ALLOWALL'
}

console.info(`[${ res.getHeader('reqid') }] Proxy onProxyRes`, res.statusCode, JSON.stringify(proxyRes.headers))
// console.info(`[${ res.getHeader('reqid') }] Proxy onProxyRes`, res.statusCode, JSON.stringify(proxyRes.headers))
},

onError(err, req, res) {
Expand Down

0 comments on commit 2642ab6

Please sign in to comment.