Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
c

ExternalUrl

class ExternalUrl

An absolute http or https URL with a host, for redirects that leave the application.

Use it for destinations outside the router, such as a payment page or an identity provider, and pass it to redirect. Building one checks the URL's shape, not its host: when any part of it comes from user input, check the host against the destinations the application allows first, or the redirect is an open redirect.

Parameters

url

the checked URL

Defined by scalive.ExternalUrl. View source (scalive/api/src/scalive/ExternalUrl.scala:15-25)

Methods1

href

def href: String

Returns the encoded URL, suitable for an HTML href or a Location header.

Defined by scalive.ExternalUrl.href. View source (scalive/api/src/scalive/ExternalUrl.scala:17-17)

Values1

url

val url: zio.http.URL

The checked URL.

Defined by scalive.ExternalUrl.url. View source (scalive/api/src/scalive/ExternalUrl.scala:15-15)