ci: update Node.js requirement and improve code consistency

Updated the README to require Node.js 18+ and added Docker usage instructions. Refactored util/client-sign.js for consistent code style and improved variable naming. Fixed the login_cellphone module to use 'weapi' in createOption. Removed deprecated code from server.js and improved CORS header formatting. Minor fix in util/request.js for user agent selection.

Co-Authored-By: binaryify <[email protected]>
This commit is contained in:
MoeFurina
2026-01-16 22:35:16 +08:00
co-authored by binaryify
parent 5fc9346e0e
commit 805d0bccc5
6 changed files with 213 additions and 180 deletions
+2 -3
View File
@@ -100,7 +100,7 @@ const SPECIAL_STATUS_CODES = new Set([201, 302, 400, 502, 800, 801, 802, 803])
// chooseUserAgent函数
const chooseUserAgent = (crypto, uaType = 'pc') => {
return userAgentMap[crypto]?.[uaType] || ''
return (userAgentMap[crypto] && userAgentMap[crypto][uaType]) || ''
}
// cookie处理
@@ -152,8 +152,7 @@ const createHeaderCookie = (header) => {
const generateRequestId = () => {
return `${now()}_${floor(random() * 1000)
.toString()
.padStart(4, "0")}`;
.padStart(4, '0')}`
}
const createRequest = (uri, data, options) => {