整理文档及修改配置

This commit is contained in:
not-like-juvenile
2026-03-16 14:58:00 +08:00
parent e70211f1d2
commit dac730474b
12 changed files with 3019 additions and 11 deletions

View File

@@ -51,6 +51,12 @@ function supaFetch(restPath, opts = {}, useBearer = false) {
Accept: 'application/json'
})
if (useBearer) headers.Authorization = `Bearer ${SUPA_KEY}`
if (process.env.DEBUG_SUPA) {
console.log(`[DEBUG] supaFetch: ${opts.method || 'GET'} ${url}`)
console.log(`[DEBUG] Headers: apikey=${SUPA_KEY ? SUPA_KEY.substring(0, 10) : 'MISSING'}... Authorization=${headers.Authorization ? 'PRESENT' : 'NONE'}`)
}
return fetchImpl(url, Object.assign({}, opts, { headers }))
}