fix: correct auth issues in amplitude, livestorm, mixpanel, onesignal
- amplitude: mask api_key in dry-run body output - livestorm: add missing Bearer prefix to Authorization header - mixpanel: mask token/$token in dry-run ingestion body output - onesignal: change auth from 'Key' to 'Basic' per OneSignal REST API docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,9 @@ if (!API_KEY) {
|
||||
|
||||
async function ingestApi(method, path, body) {
|
||||
if (args['dry-run']) {
|
||||
return { _dry_run: true, method, url: `${INGESTION_URL}${path}`, headers: { 'Content-Type': 'application/json' }, body: body || undefined }
|
||||
const maskedBody = body ? JSON.parse(JSON.stringify(body)) : undefined
|
||||
if (maskedBody && maskedBody.api_key) maskedBody.api_key = '***'
|
||||
return { _dry_run: true, method, url: `${INGESTION_URL}${path}`, headers: { 'Content-Type': 'application/json' }, body: maskedBody }
|
||||
}
|
||||
const res = await fetch(`${INGESTION_URL}${path}`, {
|
||||
method,
|
||||
|
||||
Reference in New Issue
Block a user