(bool)env('CHECK_SIGN', false), // 签名盐 'salt' => (string)env('SIGN_SALT', '352bb5074767ca21fb7204bf47e5dba5fb4302a322d62308da6c7a06badd18d9'), // 时间窗(秒):请求时间与本机时间的最大允许偏差 'ttl' => (int)env('SIGN_TTL', 180), // 是否对 nonce 去重(防重放):同一 nonce 在时间窗内只允许使用一次,依赖 Redis 'nonce_unique' => (bool)env('SIGN_NONCE_UNIQUE', true), /* | 免验签白名单:命中的用户 / 公司跳过验签(用于内部账号灰度或线上排障) | 多个用逗号分隔,例如 SIGN_SKIP_UIDS=1,2 SIGN_SKIP_CPIDS=1 | 留空表示不跳过任何账号 */ 'skip_uids' => array_values(array_filter(array_map('intval', explode(',', (string)env('SIGN_SKIP_UIDS', ''))))), 'skip_cpids' => array_values(array_filter(array_map('intval', explode(',', (string)env('SIGN_SKIP_CPIDS', ''))))), // 签名算法(hash_hmac 支持的算法) 'algo' => (string)env('SIGN_ALGO', 'sha256'), ];