pub fn check_protocol_allowed_with(
protocol: &str,
inputs: &ProtocolPolicyInputs,
) -> Result<(), ProtocolError>Expand description
Check whether a given protocol (e.g. file, git, ssh, https) is allowed.
Rules match Git’s transport.c / is_transport_allowed:
GIT_ALLOW_PROTOCOLis a colon- or comma-separated whitelist.protocol.<name>.allowoverrides the blanket config.protocol.allowsupplies a blanket default.- Built-in defaults:
http,https,git, andsshare always allowed;extis never allowed; any other protocol isuser.