mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add some more comments on why http / https is handled in different code paths
This commit is contained in:
parent
37ef3e187b
commit
05354ba2f0
2 changed files with 7 additions and 1 deletions
|
|
@ -4,6 +4,9 @@ import * as https from "https";
|
|||
export function handleHttpProxyRequest(req, res) {
|
||||
const url = new URL(req.url);
|
||||
|
||||
// The protocol for the plainHttpProxy should usually only be http:
|
||||
// but when the client for some reason sends an https: request directly
|
||||
// instead of using the CONNECT method, we should handle it gracefully.
|
||||
let protocol;
|
||||
if (url.protocol === "http:") {
|
||||
protocol = http;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue