mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
165ba74029
commit
646d4dec74
@ -77,12 +77,11 @@ export class LensProxy {
|
|||||||
proxySocket.connect(connectOpts, () => {
|
proxySocket.connect(connectOpts, () => {
|
||||||
proxySocket.write(`${req.method} ${pUrl.path} HTTP/1.1\r\n`)
|
proxySocket.write(`${req.method} ${pUrl.path} HTTP/1.1\r\n`)
|
||||||
proxySocket.write(`Host: ${apiUrl.host}\r\n`)
|
proxySocket.write(`Host: ${apiUrl.host}\r\n`)
|
||||||
for(let i = 0; i < req.rawHeaders.length; i++) {
|
for (let i = 0; i < req.rawHeaders.length; i += 2) {
|
||||||
const key = req.rawHeaders[i]
|
const key = req.rawHeaders[i]
|
||||||
if (key !== "Host" && key !== "Authorization") {
|
if (key !== "Host" && key !== "Authorization") {
|
||||||
proxySocket.write(`${req.rawHeaders[i]}: ${req.rawHeaders[i+1]}\r\n`)
|
proxySocket.write(`${req.rawHeaders[i]}: ${req.rawHeaders[i+1]}\r\n`)
|
||||||
}
|
}
|
||||||
i++
|
|
||||||
}
|
}
|
||||||
proxySocket.write("\r\n")
|
proxySocket.write("\r\n")
|
||||||
proxySocket.write(head)
|
proxySocket.write(head)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user