mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-09-21 20:15:28 -04:00
Add an optional per-host rate limit. This currently only applies to the top- level navigation. This makes it simpler to implement and simpler to reason about. The full load of a page is only ever delayed at its head, not sporadically through the page loading. The use-case where a RateLimiter is most useful is when the browser is crawling multiple pages of the same site, and in that case, the top-level rate limit still applies some degree of limit to any linked resources (e.g. a JS on a different host). `--http-nav-delay` is the delay, in milliseconds, to apply to top level navigates per host. Currently defaults to 0 (disabled). `--http-nav-burst` is the burst allowed per host. Defaults to 1 (has no impact when `--http-nav-delay` is disabled).