Skip to content

assertPublicHttpUrl

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/api/src/technical-docs/ssrf.ts

Validate that a URL is http(s) and does not point at a private address (by hostname pattern or DNS resolution). Throws BadRequestException.

Signature

ts
async function assertPublicHttpUrl(rawUrl: string): Promise<URL>

Parameters

NameType
rawUrlstring

Returns: Promise<URL>

Was this page helpful?

Download as PDF