整理文档及修改配置
This commit is contained in:
@@ -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 }))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user