UrlPolicy

org.llm4s.rag.loader.UrlPolicy
See theUrlPolicy companion trait
object UrlPolicy

Attributes

Companion
trait
Source
UrlPolicy.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
UrlPolicy.type

Members list

Type members

Classlikes

final case class Standard extends UrlPolicy

The built-in policy.

The built-in policy.

Value parameters

allowPrivateNetworks

whether a host may resolve to a loopback, private or other non-public address. The cloud metadata endpoint (169.254.169.254, fd00:ec2::254, metadata.google.internal, metadata.internal, and 169.254.169.254 inside a NAT64, IPv4-mapped or 6to4 IPv6 address) stays refused either way.

allowedHosts

when non-empty, only these hosts and their subdomains may be fetched (case-insensitive)

allowedSchemes

the URL schemes that may be fetched; the loaders speak only http and https

blockedHosts

hosts that, with their subdomains, are refused in addition to the defaults

resolver

how a host name is resolved: InetAddress.getAllByName by default

Attributes

Companion
object
Source
UrlPolicy.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait UrlPolicy
class Object
trait Matchable
class Any
Show all
object Standard

Attributes

Companion
class
Source
UrlPolicy.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Standard.type

Value members

Concrete fields

Today's SSRF check (NetworkSecurity.validateUrl): http and https, public addresses only, localhost and the cloud metadata host names refused.

Today's SSRF check (NetworkSecurity.validateUrl): http and https, public addresses only, localhost and the cloud metadata host names refused.

Attributes

Source
UrlPolicy.scala

Resolves host with InetAddress.getAllByName, which cannot be interrupted (see NetworkSecurity).

Resolves host with InetAddress.getAllByName, which cannot be interrupted (see NetworkSecurity).

Attributes

Source
UrlPolicy.scala