summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLi Zhineng <[email protected]>2025-07-12 22:27:35 +0800
committerLi Zhineng <[email protected]>2025-07-12 22:35:09 +0800
commitf12a332a6d536027c5fc96ef41109215ec769571 (patch)
treee0d2d44619563df30415f1d8e9368878e7341859
parent7acc874c00bbdd3c389fa17176abf528ab6d5c0f (diff)
downloadsetup-f12a332a6d536027c5fc96ef41109215ec769571.tar.gz
setup-f12a332a6d536027c5fc96ef41109215ec769571.zip
http
-rw-r--r--main.mjs5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.mjs b/main.mjs
index 41bf8e0..04d7c02 100644
--- a/main.mjs
+++ b/main.mjs
@@ -851,7 +851,10 @@ class SuccessForm extends Form {
return null
}
- const response = await fetch(`https://i.airmx.cn/exchange?device=${this.#deviceId}`)
+ // We are using HTTP because the domain name is remapped to our local
+ // mock server, and the communication between the device and our mock
+ // server utilizes the HTTP protocol as well.
+ const response = await fetch(`http://i.airmx.cn/exchange?device=${this.#deviceId}`)
if (! response.ok) {
throw new Error('Could not retrieve the device key.')