mirror of
https://github.com/intergalacticalvariable/reader.git
synced 2024-11-16 11:42:32 +08:00
feat: Add logging for scrapping options context
This commit is contained in:
parent
77be0d08ff
commit
c77135490b
|
@ -195,7 +195,9 @@ export class CrawlerOptions extends AutoCastable {
|
||||||
res: Response,
|
res: Response,
|
||||||
} | undefined;
|
} | undefined;
|
||||||
|
|
||||||
|
console.log(`ctx: ${JSON.stringify(ctx)}`);
|
||||||
const customMode = ctx?.req.get('x-respond-with') || ctx?.req.get('x-return-format');
|
const customMode = ctx?.req.get('x-respond-with') || ctx?.req.get('x-return-format');
|
||||||
|
console.log(`customMode: ${customMode}`);
|
||||||
if (customMode !== undefined) {
|
if (customMode !== undefined) {
|
||||||
instance.respondWith = customMode;
|
instance.respondWith = customMode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user