mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user