Skip to content

Commit 5084651

Browse files
author
埃博拉酱
committed
Clarify terminal allow-any-origin rationale
Update the init-alpine.sh comment around axs --allow-any-origin so it matches the current build behavior. Remove the outdated claim that the build pipeline rewrites Cordova scheme to http and document the actual reason this stopgap remains in place until axs supports a narrower origin or auth gate.
1 parent 3f6cf86 commit 5084651

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/plugins/terminal/scripts/init-alpine.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,12 @@ chmod +x "$PREFIX/alpine/initrc"
266266
#actual source
267267
#everytime a terminal is started initrc will run
268268
# Required for the WebView's HTTP probe and terminal requests to localhost:8767.
269-
# Upstream Cordova defaults to https://localhost, and axs already allows that
270-
# origin by default. However, this repo's build pipeline rewrites the Cordova
271-
# Scheme to http so the app can use ws://localhost terminal sockets.
272-
# Without this CORS allowance, fetch() fails with "TypeError: Failed to fetch"
273-
# even though axs is already listening, which triggers false repair/reinstall loops.
269+
# Upstream Cordova commonly runs under https://localhost, which axs already
270+
# allows by default. In this repo, terminal startup and localhost readiness
271+
# probes can still originate from contexts outside axs's built-in default
272+
# allowlist. Without this CORS allowance, fetch() fails with
273+
# "TypeError: Failed to fetch" even though axs is already listening, which
274+
# triggers false repair/reinstall loops.
274275
# axs currently exposes only its default https://localhost policy or a global
275276
# allow-any-origin switch; it does not support an explicit origin allowlist yet.
276277
# Tightening this inside the shell wrapper is not possible: Origin validation has

0 commit comments

Comments
 (0)