[Library | new-theme]: timeout-interceptor.service.ts: Increased server and client timeout time when environment != production.
This commit is contained in:
parent
d43f576d40
commit
fd9794ec3a
|
@ -19,7 +19,9 @@ export class TimeoutInterceptor implements HttpInterceptor {
|
|||
return next.handle(req);
|
||||
}
|
||||
|
||||
const timeoutValue = isPlatformServer(this.platformId)?3000:6000;//req.headers.get('timeout') || this.defaultTimeout;
|
||||
let serverTime = properties.environment == "production" ? 3000 : 4000;
|
||||
let clientTime = properties.environment == "production" ? 6000 : 12000;
|
||||
const timeoutValue = isPlatformServer(this.platformId)?serverTime:clientTime;//req.headers.get('timeout') || this.defaultTimeout;
|
||||
const timeoutValueNumeric = Number(timeoutValue);
|
||||
return next.handle(req).pipe(timeout(timeoutValueNumeric));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue