Skip to content

Commit 3f6cf86

Browse files
author
埃博拉酱
committed
docs: clarify terminal CORS context and fix formatting
Adjust the init-alpine.sh comment so it distinguishes upstream Cordova's default https://localhost origin from this repo's build pipeline, which rewrites the scheme to http for ws:// terminal sockets. Also fix the remaining terminal.js formatting issue that was flagged by Biome in CI.
1 parent 9e10b4b commit 3f6cf86

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/components/terminal/terminal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ export default class TerminalComponent {
740740
);
741741
if (retryResp.ok) {
742742
const retryData = await retryResp.text();
743-
if (!parsePtyOpenError(retryData)) {
743+
if (!parsePtyOpenError(retryData)) {
744744
this.pid = retryData.trim();
745745
return this.pid;
746746
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ 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.
269272
# Without this CORS allowance, fetch() fails with "TypeError: Failed to fetch"
270273
# even though axs is already listening, which triggers false repair/reinstall loops.
271274
# axs currently exposes only its default https://localhost policy or a global

0 commit comments

Comments
 (0)