This example uses mdata as custom protocol and csp img-src
tauri.conf.json
{
"tauri" : {
"allowlist" : {
"protocol": {| use std::fs::File; | |
| use std::io::Seek; | |
| use std::io::BufRead; | |
| use std::io::SeekFrom; | |
| use std::io::BufReader; | |
| #[cfg(windows)] | |
| const OS_STRING_ENDING: &'static str = "\r\n"; |
| pub trait EnhancePlugin<R: tauri::Runtime> { | |
| fn plugin_windows<P: tauri::plugin::Plugin<R> + 'static>(self, plugin: P) -> Self; | |
| fn plugin_linux<P: tauri::plugin::Plugin<R> + 'static>(self, plugin: P) -> Self; | |
| fn plugin_macos<P: tauri::plugin::Plugin<R> + 'static>(self, plugin: P) -> Self; | |
| fn plugin_android<P: tauri::plugin::Plugin<R> + 'static>(self, plugin: P) -> Self; | |
| fn plugin_ios<P: tauri::plugin::Plugin<R> + 'static>(self, plugin: P) -> Self; | |
| fn plugin_desktop<P: tauri::plugin::Plugin<R> + 'static>(self, plugin: P) -> Self; | |
| fn plugin_mobile<P: tauri::plugin::Plugin<R> + 'static>(self, plugin: P) -> Self; | |
| } |