Skip to main content

browser_grant

Function browser_grant 

Source
pub fn browser_grant(path: &str) -> Result<Grant, Error>
Expand description

Returns the grant for a browser that dialed path: subscribe anywhere, publish under ANON.

The rule is rooted at / and reduced to the dialed path, as moq-relay does with its public rules. The grant itself is rooted at the dialed path, so granting the unreduced rule would let a browser that dials /live/<id> publish beneath it. ANON keeps a browser out of live/ and rooms/, whose paths name an iroh publisher.

ยงErrors

Returns an error if path is not a valid path.