fix(deps): update dependency typescript-eslint to ^8.28.0 (#2693)
* fix(deps): update dependency typescript-eslint to ^8.28.0 * fix: lint issues --------- Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com> Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
committed by
GitHub
parent
07f0abf28c
commit
f624611540
@@ -8,12 +8,9 @@ export const extractBaseUrlFromHeaders = (
|
||||
headers: ReadonlyHeaders,
|
||||
fallbackProtocol: "http" | "https" = "http",
|
||||
): `${string}://${string}` => {
|
||||
let protocol = headers.get("x-forwarded-proto");
|
||||
|
||||
// If the protocol is not set or an empty string
|
||||
if (!protocol) {
|
||||
protocol = fallbackProtocol;
|
||||
}
|
||||
// For empty string we also use the fallback protocol
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
let protocol = headers.get("x-forwarded-proto") || fallbackProtocol;
|
||||
|
||||
// @see https://support.glitch.com/t/x-forwarded-proto-contains-multiple-protocols/17219
|
||||
if (protocol.includes(",")) {
|
||||
|
||||
Reference in New Issue
Block a user