Well, so I got this huge error (file 1) with the code below (file 2) when trying to change my origin to watch 3rd sources videos without having the localhost classic error.
Thread: https://github.com/tauri-apps/tauri/discussions/4912
17 messages · Page 1 of 1 (latest)
Well, so I got this huge error (file 1) with the code below (file 2) when trying to change my origin to watch 3rd sources videos without having the localhost classic error.
Thread: https://github.com/tauri-apps/tauri/discussions/4912
Tauri info:
[✔] Environment
- OS: Windows 10.0.26100 x86_64 (X64)
✔ WebView2: 137.0.3296.68
✔ MSVC:
- Visual Studio Build Tools 2017
- Visual Studio Build Tools 2022
✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
✔ cargo: 1.87.0 (99624be96 2025-05-06)
✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 22.13.1
- yarn: 1.22.22
- npm: 10.9.2
- bun: 1.2.14
[-] Packages
- tauri :crab:: 2.5.1
- tauri-build :crab:: 2.2.0
- wry :crab:: 0.51.2
- tao :crab:: 0.33.0
- @tauri-apps/api : 2.5.0
- @tauri-apps/cli : 2.5.0
[-] Plugins
- tauri-plugin-process :crab:: 2.2.1
- @tauri-apps/plugin-process : 2.2.1
- tauri-plugin-store :crab:: 2.2.0
- @tauri-apps/plugin-store : 2.1.0 (outdated, latest: 2.2.0)
- tauri-plugin-window-state :crab:: 2.2.2
- @tauri-apps/plugin-window-state : 2.2.2
- tauri-plugin-single-instance :crab:: 2.2.4
- @tauri-apps/plugin-single-instance : not installed!
- tauri-plugin-os :crab:: 2.2.1
- @tauri-apps/plugin-os : 2.2.1
- tauri-plugin-http :crab:: 2.4.4
- @tauri-apps/plugin-http : 2.4.3
``` 1/2
(outdated, latest: 2.4.4)
- tauri-plugin-autostart :crab:: 2.3.0
- @tauri-apps/plugin-autostart : 2.3.0
- tauri-plugin-sql :crab:: 2.2.0
- @tauri-apps/plugin-sql : 2.2.0
- tauri-plugin-dialog :crab:: 2.2.2
- @tauri-apps/plugin-dialog : 2.2.1 (outdated, latest: 2.2.2)
- tauri-plugin-global-shortcut :crab:: 2.2.1
- @tauri-apps/plugin-global-shortcut : 2.2.0 (outdated, latest: 2.2.1)
- tauri-plugin-notification :crab:: 2.2.2
- @tauri-apps/plugin-notification : 2.0.0 (outdated, latest: 2.2.2)
- tauri-plugin-fs :crab:: 2.3.0
- @tauri-apps/plugin-fs : 2.2.1 (outdated, latest: 2.3.0)
- tauri-plugin-log :crab:: 2.4.0
- @tauri-apps/plugin-log : 2.0.2 (outdated, latest: 2.4.0)
- tauri-plugin-shell :crab:: 2.2.1
- @tauri-apps/plugin-shell : 2.2.1
- tauri-plugin-cli :crab:: 2.2.0
- @tauri-apps/plugin-cli : 2.2.0
- tauri-plugin-updater :crab:: 2.7.1
- @tauri-apps/plugin-updater : 2.7.1
[-] App
- build-type: bundle
- CSP: http://asset.localhost
- frontendDist: ../build
- devUrl: http://localhost:5174/
- framework: Svelte
- bundler: Vite
``` 2/2
@karmic tendon sorry to bother but i was trying what u indicated and I'm too young to make this work :/
Have you tried that yet?
https://tauri.app/security/http-headers/
yeahh, no luck
What I do is just write it in Rust, it bypasses CORS
It's just what I do, not sure if there's another way.
its for bypassing in videos, streaming native. so I cant use it in rust side anyway
most of the errors there are a version mismatchi think. your windows and webview2-com crate versions must match what's used in tauri.
for tauri 2.5.1 that's windows 0.61 and webview2-com 0.37
btw, depending on the errors you saw (that made you look into a custom error) these changes may still not be enough: https://discord.com/channels/616186924390023171/1367193548918620343
yep, some methods disappearead so the code doesn't work right now
currently code with updated libs (not working but it builds lol)
@karmic tendon could this example from Tauri work for me?
https://github.com/tauri-apps/tauri/tree/dev/examples/streaming
the built-in asset protocol should behave the same as the streaming example and both require the file to be downloaded first so you may as well use the asset protocol.
or well, i guess you could try to change the example to pull the required bytes from the server
so that the custom protocol is basically a proxy