(relayUrl: string | undefined)
| 84 | } |
| 85 | |
| 86 | const getRelayUrlPathPrefix = (relayUrl: string | undefined): string => { |
| 87 | if (typeof relayUrl !== 'string') { |
| 88 | return '' |
| 89 | } |
| 90 | |
| 91 | try { |
| 92 | return normalizePathPrefix(new URL(relayUrl).pathname) |
| 93 | } catch { |
| 94 | return '' |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | const getTrustedForwardedPathPrefix = (request: IncomingMessage, settings: Settings): string => { |
| 99 | const socketAddress = request.socket?.remoteAddress |
no test coverage detected