fix(log_job): don't redact with auth header

This commit is contained in:
Móricz Gergő 2025-01-09 09:50:54 +01:00
parent 14f696805c
commit 9e8c629ff4

View File

@ -27,19 +27,20 @@ export async function logJob(job: FirecrawlJob, force: boolean = false) {
} }
// Redact any pages that have an authorization header // Redact any pages that have an authorization header
if ( // actually, Don't. we use the db to retrieve results now. this breaks authed crawls - mogery
job.scrapeOptions && // if (
job.scrapeOptions.headers && // job.scrapeOptions &&
job.scrapeOptions.headers["Authorization"] // job.scrapeOptions.headers &&
) { // job.scrapeOptions.headers["Authorization"]
job.scrapeOptions.headers["Authorization"] = "REDACTED"; // ) {
job.docs = [ // job.scrapeOptions.headers["Authorization"] = "REDACTED";
{ // job.docs = [
content: "REDACTED DUE TO AUTHORIZATION HEADER", // {
html: "REDACTED DUE TO AUTHORIZATION HEADER", // content: "REDACTED DUE TO AUTHORIZATION HEADER",
}, // html: "REDACTED DUE TO AUTHORIZATION HEADER",
]; // },
} // ];
// }
const jobColumn = { const jobColumn = {
job_id: job.job_id ? job.job_id : null, job_id: job.job_id ? job.job_id : null,
success: job.success, success: job.success,