Which URLs UrlLoader, WebCrawlerLoader and the crawler's robots.txt fetch may request, and at which addresses.
A loader asks the policy before every request it makes: the seed URL, each crawled link, every redirect hop and robots.txt. The policy answers with the addresses the host may be reached at, and the loader connects to one of those addresses itself (sending the original Host header and, for https, the original server name and certificate check), so a host whose DNS answer changes after the check (DNS rebinding) cannot redirect the connection elsewhere.
UrlPolicy.default is the SSRF check of NetworkSecurity.validateUrl: http and https only, and no host that resolves to a loopback, private, link-local or other non-public address. Its with* setters add an allow-list of hosts, extra blocked hosts or private-network access. An application with other rules implements this trait.
Attributes
- Companion
- object
- Source
- UrlPolicy.scala
- Graph
-
- Supertypes
- Known subtypes
-
class Standard
