Struct tauri_codegen::embedded_assets::CspHashes  
source · pub struct CspHashes { /* private fields */ }Expand description
Holds all hashes that we will apply on the CSP tag/header.
Implementations§
source§impl CspHashes
 
impl CspHashes
sourcepub fn add_if_applicable(
    &mut self,
    entry: &DirEntry,
    dangerous_disable_asset_csp_modification: &DisabledCspModificationKind
) -> Result<(), EmbeddedAssetsError>
 
pub fn add_if_applicable( &mut self, entry: &DirEntry, dangerous_disable_asset_csp_modification: &DisabledCspModificationKind ) -> Result<(), EmbeddedAssetsError>
Only add a CSP hash to the appropriate category if we think the file matches
Note: this only checks the file extension, much like how a browser will assume a .js file is a JavaScript file unless HTTP headers tell it otherwise.