mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 22:59:04 +08:00
fix(log_job): don't redact with auth header
This commit is contained in:
parent
14f696805c
commit
9e8c629ff4
@ -27,19 +27,20 @@ export async function logJob(job: FirecrawlJob, force: boolean = false) {
|
||||
}
|
||||
|
||||
// Redact any pages that have an authorization header
|
||||
if (
|
||||
job.scrapeOptions &&
|
||||
job.scrapeOptions.headers &&
|
||||
job.scrapeOptions.headers["Authorization"]
|
||||
) {
|
||||
job.scrapeOptions.headers["Authorization"] = "REDACTED";
|
||||
job.docs = [
|
||||
{
|
||||
content: "REDACTED DUE TO AUTHORIZATION HEADER",
|
||||
html: "REDACTED DUE TO AUTHORIZATION HEADER",
|
||||
},
|
||||
];
|
||||
}
|
||||
// actually, Don't. we use the db to retrieve results now. this breaks authed crawls - mogery
|
||||
// if (
|
||||
// job.scrapeOptions &&
|
||||
// job.scrapeOptions.headers &&
|
||||
// job.scrapeOptions.headers["Authorization"]
|
||||
// ) {
|
||||
// job.scrapeOptions.headers["Authorization"] = "REDACTED";
|
||||
// job.docs = [
|
||||
// {
|
||||
// content: "REDACTED DUE TO AUTHORIZATION HEADER",
|
||||
// html: "REDACTED DUE TO AUTHORIZATION HEADER",
|
||||
// },
|
||||
// ];
|
||||
// }
|
||||
const jobColumn = {
|
||||
job_id: job.job_id ? job.job_id : null,
|
||||
success: job.success,
|
||||
|
Loading…
x
Reference in New Issue
Block a user