Skip to main content

content_security_policy

Function content_security_policy 

Source
fn content_security_policy(shape: &Shape) -> String
Expand description

The policy of the served UI and the sign-in page. 'unsafe-inline' for styles only: the terminal and layout set inline styles. 'wasm-unsafe-eval' lets the code highlighter’s WebAssembly engine (Oniguruma, in shiki) compile and nothing else: scripts still come from this origin only, and eval of text stays refused. base-uri 'self' lets a library resolve a relative address against a base on this origin (the drag-preview picture does, for the fonts) and no other.