devme's picture
Upload 15 files
50852f0 verified
raw
history blame contribute delete
273 Bytes
/**
* 从请求头获取认证信息
* @param {Object} req - Express 请求对象
* @returns {string|undefined} 认证令牌
*/
export function getAuthHeader(req) {
return req.headers.authorization || req.headers.Authorization || req.headers['x-api-key']
}