Allow {{host}} and {{port}} in domain proxy (#6225)

This commit is contained in:
Simon Merschjohann
2023-05-31 23:31:30 +02:00
committed by GitHub
parent 2109d1cf6a
commit 0703ef008c
6 changed files with 68 additions and 27 deletions

View File

@@ -373,7 +373,7 @@ export function authenticateOrigin(req: express.Request): void {
/**
* Get the host from headers. It will be trimmed and lowercased.
*/
function getHost(req: express.Request): string | undefined {
export function getHost(req: express.Request): string | undefined {
// Honor Forwarded if present.
const forwardedRaw = getFirstHeader(req, "forwarded")
if (forwardedRaw) {