Skip to content

Stop forcing external links into the native WebView#60

Merged
cfbender merged 2 commits into
mainfrom
copilot/cfbender-55-mobile-app-links
Jun 26, 2026
Merged

Stop forcing external links into the native WebView#60
cfbender merged 2 commits into
mainfrom
copilot/cfbender-55-mobile-app-links

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Mobile app links were opening inside the embedded WebView instead of the system browser. This updates Capacitor navigation policy so external HTTP(S) destinations are no longer broadly whitelisted for in-app loading.

  • Capacitor navigation policy

    • Removed wildcard allowNavigation from capacitor.config.ts.
    • This avoids treating arbitrary web hosts as in-app navigable targets.
  • Android runtime override

    • Removed the matching wildcard setAllowNavigation(...) override in MainActivity.
    • Prevents Android native boot config from reintroducing the same broad in-app navigation behavior.
  • Regression coverage

    • Added a focused config test asserting server.allowNavigation is unset.
// capacitor.config.ts
server: {
  cleartext: true,
}

Copilot AI changed the title [WIP] Fix mobile app links to open in browser app Stop forcing external links into the native WebView Jun 26, 2026
Copilot AI requested a review from cfbender June 26, 2026 12:34
@cfbender cfbender marked this pull request as ready for review June 26, 2026 12:36
@cfbender cfbender merged commit 460f1c1 into main Jun 26, 2026
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.

2 participants