[ACA-4202] - forcing firefox to ignore cache when document version ha… (#6807)

* [ACA-4202] - forcing firefox to ignore cache when document version has changed

* fxed lint
This commit is contained in:
Vito
2021-04-09 11:44:14 +01:00
committed by GitHub
parent 318ce0e346
commit f9a7836a5a
3 changed files with 12 additions and 0 deletions

View File

@@ -68,6 +68,9 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
@Input()
thumbnailsTemplate: TemplateRef<any> = null;
@Input()
cacheType: string = '';
@Output()
rendered = new EventEmitter<any>();
@@ -161,6 +164,11 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
url: urlFile.currentValue,
withCredentials: this.appConfigService.get<boolean>('auth.withCredentials', undefined)
};
if (this.cacheType) {
pdfSource.httpHeaders = {
'Cache-Control': this.cacheType
};
}
this.executePdf(pdfSource);
}