Skip to content

Origin

[Source]

The origin of a URL: whether it is secure (https), the host, and the port.

Two requests share an origin when all three match. Host comparison is case-insensitive; the host is lowercased on construction. Redirect header stripping uses origin equality — credentials are removed when a hop crosses to a different origin.

class val Origin is
  Equatable[Origin val] ref,
  Stringable box

Implements


Constructors

create

[Source]

new val create(
  secure': Bool val,
  host': String val,
  port': String val)
: Origin val^

Parameters

Returns


from_uri

[Source]

Extract the origin from a parsed URI. The host is lowercased and IPv6 brackets are stripped; the port defaults to 443 (https) or 80 (http) when the URI omits it. When the URI has no authority, host is empty.

new val from_uri(
  url: URI val)
: Origin val^

Parameters

Returns


Public fields

let secure: Bool val

[Source]


let host: String val

[Source]


let port: String val

[Source]


Public Functions

eq

[Source]

fun box eq(
  that: Origin box)
: Bool val

Parameters

Returns


string

[Source]

fun box string()
: String iso^

Returns


ne

[Source]

fun box ne(
  that: Origin val)
: Bool val

Parameters

Returns