Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Pages actions reject capacitor:// URLs in the iOS WebView

Offen
#480 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
68/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
frontend

Rechercherichtung

Start by locating the Pages navigation engine and its URL scheme guard, then read the same-app URL comparison and related tests. Add coverage for capacitor://localhost navigation and for a different Capacitor host; verify HTTP(S) behavior is unchanged and other schemes remain rejected.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

Void Pages rejects capacitor:// URLs, which Capacitor uses by default for local pages in its iOS WKWebView. Initial rendering and hydration work, but submitting a Pages action fails with:

Void Router: refusing to navigate to a capacitor: URL.

Observed with Void / @void/react 1.1.11 on an iOS 26.1 simulator. The same protocol guard is present on main (9ed64ba).

Reproduction

  1. Serve a Void React Pages application in a Capacitor iOS WebView at capacitor://localhost, with page requests forwarded to its Worker.
  2. Hydrate the page and submit a Pages form action, or invoke router.visit('/users', { method: 'POST' }).
  3. The navigation engine rejects the URL before sending the page request.

Expected: same-app Pages GET/POST navigation works under the default capacitor:// scheme.

Changing server.iosScheme to HTTP(S) is not a workaround: WKWebView already handles those schemes and Capacitor cannot register them. See Capacitor's configuration reference.

Proposed scope

Allow capacitor: alongside HTTP(S) in the Pages navigation engine. It also needs a small same-app URL comparison adjustment: new URL('capacitor://localhost/users').origin is "null", so comparing that value directly with WKWebView's window.location.origin does not identify the local app. Compare protocol and host for capacitor: only, preserving HTTP(S) behavior and rejecting other schemes.

No Capacitor dependency or configurable scheme registry is needed. Different Capacitor hosts must not be treated as the same origin.

Vorherrschende Sprache
TypeScript
Sterne
402
Forks
32
Ø Merge
12 Std. 28 Min.
Gemergte PRs (30 T.)
77

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus voidzero-dev/void

Alle Issues in voidzero-dev/void

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.