Hi Ervin,
Thank you for contacting Syncfusion support.
We can add Authorization header to the PDF Viewer control’s Ajax request in the sample level. Kindly include the below code in ngOnInit() of TS file,
ngOnInit(): void {
(<any> XMLHttpRequest).prototype.realSend = XMLHttpRequest.prototype.send;
var newSend = function (vData) {
this.setRequestHeader('Authorization', 'Bearer 64565dfgfdsjweiuvbiuyhiueygf');
this.realSend(vData);
};
XMLHttpRequest.prototype.send = newSend;
} |
The XMLHttpRequest’s method setRequestHeader(), adds custom HTTP headers to the request.
We have created the sample for the same and shared in the following location,
Please find the below KB link for reference,
Please try this and let us know if you have any concerns on this.
Regards,
Akshaya