Add header values in the TypeScript PDF Viewer

Use the ajaxHeaders property in the PDF Viewer’s ajaxRequestSettings to include custom headers with each AJAX request.

Example: Add a custom Authorization header using ajaxRequestSettings

viewer.ajaxRequestSettings = {
   ajaxHeaders: [
      {
         headerName: "Authorization",

         headerValue: "Bearer 64565dfgfdsjweiuvbiuyhiueygf"
      }
   ],

   withCredentials: false
};

Sample: How to add custom headers using ajaxRequestSettings
StackBlitz example