Tauri Security Asset Protocol

Use when serving local files into a Tauri v2 WebView — enabling `app.security.assetProtocol`, scoping which paths it exposes, using `convertFileSrc` to produce `asset://` / `https://asset.localhost` URLs, the matching CSP `img-src`/`media-src` directives, persisting user-picked paths with `tauri-plugin-persisted-scope` (`protocol-asset` feature), and choosing the asset protocol over base64-via-command for performance.

stuffbucket b8b8ca8 3 files · 9.0 KB Updated

File contents

stuffbucket/skills/tree/main/plugins/stuffbucket/skills/tauri-security-asset-protocol commit b8b8ca8cba

Frequently asked questions

npx skillmds@latest add stuffbucket/tauri-security-asset-protocol