Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ export const nodeRequestToWebstand = (
return _signal
},
// @ts-expect-error
// ? https://github.com/nodejs/node/issues/46221#issuecomment-1426707013
duplex: 'content-length' in req.headers ? true : undefined
duplex: 'half'
})
}

Expand Down Expand Up @@ -349,10 +348,10 @@ export const node = () => {
typeof options === 'number'
? options
: {
...options,
// @ts-ignore
host: options?.hostname
},
...options,
// @ts-ignore
host: options?.hostname
},
() => {
const address = server.address()
const hostname =
Expand Down Expand Up @@ -409,10 +408,10 @@ export const node = () => {
typeof options === 'number'
? options
: {
...options,
// @ts-ignore
host: options?.hostname
}
...options,
// @ts-ignore
host: options?.hostname
}
)
},
requestIP() {
Expand Down Expand Up @@ -448,10 +447,10 @@ export const node = () => {
typeof options === 'object'
? (options as any)
: {
port: options
}
port: options
}
)
} catch {}
} catch { }
})
}
)
Expand Down