完成Salon小程序合规整改

This commit is contained in:
2026-10-22 00:27:12 +08:00
parent 1120f9d5a9
commit da1f2d2cba
99 changed files with 2815 additions and 702 deletions
+1 -5
View File
@@ -1,9 +1,7 @@
const { ADMIN_API_BASE_URL, REQUEST_TIMEOUT, ENABLE_REQUEST_SIGNING } = require('./config')
const auth = require('./auth')
const { getDeviceId } = require('./device')
const { sha256Hex, hmacSha256Hex, buildCanonicalParams, buildJsonPayload, randomNonce } = require('./crypto')
const DEVICE_ID_HEADER = 'X-Device-Id'
const HEADER_TIMESTAMP = 'X-Timestamp'
const HEADER_NONCE = 'X-Nonce'
const HEADER_SIGNATURE = 'X-Signature'
@@ -123,9 +121,7 @@ function isAuthFreePath(url) {
}
function buildSignatureHeaders(options) {
const headers = {
[DEVICE_ID_HEADER]: getDeviceId()
}
const headers = {}
const method = String(options.method || 'GET').toUpperCase()
const accessToken = auth.getAccessToken()
if (accessToken && !isAuthFreePath(options.url)) {