Skip to content

Commit 62cf100

Browse files
author
埃博拉酱
committed
Revert static terminal CORS injection
- restore the AXS launch section in init-alpine.sh to the earlier source state without the explanatory allow-any-origin comments - keep the default source startup command as plain axs invocation so allow-any-origin is no longer baked into source - leave dynamic allow-any-origin handling to the outer build/deploy script when LAN debug injection is explicitly enabled
1 parent 0f2b92a commit 62cf100

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -265,19 +265,6 @@ chmod +x "$PREFIX/alpine/initrc"
265265

266266
#actual source
267267
#everytime a terminal is started initrc will run
268-
# Required for the WebView's HTTP probe and terminal requests to localhost:8767.
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.
275-
# axs currently exposes only its default https://localhost policy or a global
276-
# allow-any-origin switch; it does not support an explicit origin allowlist yet.
277-
# Tightening this inside the shell wrapper is not possible: Origin validation has
278-
# to happen inside axs itself, where the HTTP request is handled. Until axs gains
279-
# per-origin CORS or an equivalent auth gate, keep this stopgap so terminal
280-
# startup and localhost readiness probes remain functional.
281268
"$PREFIX/axs" -c "bash --rcfile /initrc -i"
282269

283270
else

0 commit comments

Comments
 (0)