We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bace13b commit 58c24c2Copy full SHA for 58c24c2
1 file changed
examples/proxy/proxy.js
@@ -141,7 +141,12 @@ const HOP_EXPR = /^(te|host|upgrade|trailers|connection|keep-alive|http2-setting
141
// Updates via and forwarded headers.
142
// Only hop-by-hop headers may be set using the Connection general header.
143
function getHeaders (ctx) {
144
- const { req, proxyName, headers = req && req.rawHeaders } = ctx
+ const {
145
+ proxyName,
146
+ res,
147
+ req = res ? res.req : undefined,
148
+ headers = req ? req.rawHeaders : undefined
149
+ } = ctx
150
151
let via = ''
152
let forwarded = ''
0 commit comments