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:
Corey Haines
2026-02-17 22:40:03 -08:00
parent c1be574c8b
commit 51bdf2f6b3
4 changed files with 11 additions and 4 deletions
+6 -1
View File
@@ -15,7 +15,12 @@ if (!TOKEN && !API_KEY) {
async function ingestApi(method, path, body) {
const headers = { 'Content-Type': 'application/json' }
if (args['dry-run']) {
return { _dry_run: true, method, url: `${INGESTION_URL}${path}`, headers, body: body || undefined }
const maskedBody = body ? JSON.parse(JSON.stringify(body)) : undefined
if (Array.isArray(maskedBody)) maskedBody.forEach(item => {
if (item.properties && item.properties.token) item.properties.token = '***'
if (item.$token) item.$token = '***'
})
return { _dry_run: true, method, url: `${INGESTION_URL}${path}`, headers, body: maskedBody }
}
const res = await fetch(`${INGESTION_URL}${path}`, {
method,