Skip to main content

build_proxy_url

Function build_proxy_url 

Source
pub fn build_proxy_url(host: Option<&str>, s: &Settings) -> Option<String>
Expand description

Build the URL for a proxy hostname: a legacy slug, or an automatic <daemon>.<worktree>.<project> host.

This is the one place a pitchfork URL is spelled out, so everything that shows a URL, injects PITCHFORK_URL, or renders a template agrees with what the proxy serves.

Returns None if:

  • host is None (not proxied)
  • Proxy is disabled in settings
  • proxy.port is invalid (out of range or zero)