mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 04:49:05 +08:00
more logs
This commit is contained in:
parent
bb67b9812b
commit
00cc733972
@ -92,6 +92,7 @@ function checkCreditsMiddleware(
|
|||||||
export function authMiddleware(
|
export function authMiddleware(
|
||||||
rateLimiterMode: RateLimiterMode,
|
rateLimiterMode: RateLimiterMode,
|
||||||
): (req: RequestWithMaybeAuth, res: Response, next: NextFunction) => void {
|
): (req: RequestWithMaybeAuth, res: Response, next: NextFunction) => void {
|
||||||
|
const middlewareSpawn = new Error().stack;
|
||||||
return (req, res, next) => {
|
return (req, res, next) => {
|
||||||
(async () => {
|
(async () => {
|
||||||
if (rateLimiterMode === RateLimiterMode.Extract && isAgentExtractModelValid((req.body as any)?.agent?.model)) {
|
if (rateLimiterMode === RateLimiterMode.Extract && isAgentExtractModelValid((req.body as any)?.agent?.model)) {
|
||||||
@ -107,7 +108,8 @@ export function authMiddleware(
|
|||||||
modes: {
|
modes: {
|
||||||
extract: RateLimiterMode.Extract,
|
extract: RateLimiterMode.Extract,
|
||||||
extractAgentPreview: RateLimiterMode.ExtractAgentPreview,
|
extractAgentPreview: RateLimiterMode.ExtractAgentPreview,
|
||||||
}
|
},
|
||||||
|
middlewareSpawn,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user