tauri-docs
tauri-docs copied to clipboard
[request] Document that `http:` is used instead of `https://` in tauri v1 to v2 migration guide
Question you want answered
Why my app that accessing https://<protocol>.localhost/ is no longer working?
Where did you look for an answer?
I read the migration guide and I thought the guide include notable behavior changes but it wasn't so I failed to run the app on windows.
I'm mainly developing on macos so I didn't notice that until building app for final testing of migration
Page URL
https://v2.tauri.app/start/migrate/from-tauri-1/#summary-of-changes
Additional context
No response
Are you willing to work on this yourself?
- [ ] I want to work on this myself
Was this noticed after you had finished building , or while still in development . I am interested and I just want to verify you where not facing a notable issue with dev mode and build mode diff - since in prod mode you cannot access a devUrl like this http(s)://
I noticed this after I finished building app with npm run tauri build but it was not for releasing, it was for testing purposes.
I'm developing my app on macOS and building for windows on GitHub action.
Therefore, I cannot notice this in development mode problems specific to windows.
If I was working on windows, I could notice the fact that accessing resources with schemas registered with register_uri_scheme_protocol is not working.
(But If I had registered nothing with register_uri_scheme_protocol, there is no chance to notice this problem.)
The reason why I'm affected by this changes is a little tricky.
I'm disallowing accessing external pages with on_navigation callback.
In the on_navigation, if the environment is for development mode, allow http://locahost and only allow our scheme in production.
As a part of the schema check, we were checking for url.scheme() == "https" in addition to url.host_str() == Some("tauri.localhost").
So, I have to change url.scheme() == "https" to url.scheme() == "http" (remove 's').
https://github.com/vrc-get/vrc-get/blob/e1887d182b79db458e53e335bd6de2232ee248c6/vrc-get-gui/src/commands/start.rs#L110-L120
Interesting ! Let me do some tests so I could figure , the best way to document this . As it may affect some other parts and I think its great to specify too .
As it may affect some other parts and I think its great to specify too .
In my project, There's place accessing custom protocol with hard coded url and it was affected by this change.
https://github.com/vrc-get/vrc-get/blob/e1887d182b79db458e53e335bd6de2232ee248c6/vrc-get-gui/app/layout.tsx#L29