Skip to content
Snippets Groups Projects
Commit d5887a69 authored by Amine FILALI's avatar Amine FILALI
Browse files

[FIX RABB-37] Accept Timeout parameter as Http header

parent 7b44fd6a
No related branches found
No related tags found
1 merge request!1Feature/design/1
...@@ -103,6 +103,10 @@ export class VitamUIHttpInterceptor implements HttpInterceptor { ...@@ -103,6 +103,10 @@ export class VitamUIHttpInterceptor implements HttpInterceptor {
if (!applicationId) { if (!applicationId) {
applicationId = this.startupService.CURRENT_APP_ID; applicationId = this.startupService.CURRENT_APP_ID;
} }
const headerTimeout = request.headers.get('X-Api-Timeout');
if (headerTimeout && !isNaN(Number(headerTimeout))) {
this.apiTimeout = Number(headerTimeout);
}
const reqWithCredentials = request.clone({ const reqWithCredentials = request.clone({
withCredentials: true, withCredentials: true,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment