Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(windows): use http scheme by default for custom protocols and add option to change it #994

Merged
merged 8 commits into from
Aug 14, 2023

Conversation

FabianLars
Copy link
Member

We get pretty much daily requests/complains about tauri-apps/tauri#3007 and since http://localhost is still a secure context and using http will now match the behavior when using custom schemes (on Linux&macOS) i think this is honestly a no-brainer at this point.

I do plan to backport this to the version used in tauri 1.x after we polished&merged this PR :)

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Checklist

Other information

@FabianLars FabianLars requested a review from a team as a code owner July 27, 2023 09:58
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could make this the default (and flipped around if ported to tauri 1.x ofc)? what about android too?

src/webview/mod.rs Outdated Show resolved Hide resolved
src/webview/mod.rs Outdated Show resolved Hide resolved
Co-authored-by: Amr Bashir <[email protected]>
@FabianLars
Copy link
Member Author

FabianLars commented Jul 27, 2023

Maybe we could make this the default (and flipped around if ported to tauri 1.x ofc)?

Sounds good to me.

what about android too?

  1. idk its limitations == didn't know if it's even possible
  2. idk how ios behaves -> whether it allows http and https requests like linux/macos

.changes/windows-http.md Outdated Show resolved Hide resolved
src/webview/mod.rs Outdated Show resolved Hide resolved
@amrbashir
Copy link
Member

what about android too?

  1. idk its limitations == didn't know if it's even possible
  2. idk how ios behaves -> whether it allows http and https requests like linux/macos

Alright, lets worry about it later since mobile is still in alpha.

@amrbashir amrbashir changed the title feat(windows): Add option to use http scheme for custom protocols refactor(windows): use http scheme by default for custom protocols and add option to change it Aug 14, 2023
@amrbashir amrbashir merged commit b5e1875 into dev Aug 14, 2023
7 checks passed
@amrbashir amrbashir deleted the windows/http branch August 14, 2023 23:37
@github-actions github-actions bot mentioned this pull request Aug 14, 2023
amrbashir pushed a commit that referenced this pull request Aug 15, 2023
…#1005)

* feat(windows): backport #994 to allow http scheme for custom protocol

* Update .changes/windows-http.md

--------
@Dirreke
Copy link

Dirreke commented Aug 27, 2023

Hello! I'm not famaliar about it. I want to consult that if we should change https://github.com/tauri-apps/tauri/blob/af3268a4be69e2dee72ba867ee54bc36d12712e6/core/tauri/src/manager.rs#L515 to http too after this?

Except it, What others should I do to use tauri with a http backend? And if tauri-2.X can use it? Thanks!

@FabianLars
Copy link
Member Author

@Dirreke For v1 i'm working on it here: tauri-apps/tauri#7645 (mainly waiting for a new wry release). With the release of 1.5 we'll merge v1 into v2 one last time so this change will also be available in a future v2 release.

lucasfernog added a commit that referenced this pull request Sep 8, 2023
amrbashir pushed a commit that referenced this pull request Sep 8, 2023
…d add option to change it ref #994 (#1020)

* refactor(android): use http scheme by default for custom protocols and add option to change it ref #994

* update documentation

* fix example
@github-actions github-actions bot mentioned this pull request Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants