Unload method throws 401, cookie not attached

I'm using a backend-backed PDF viewer. I have a problem with one enpoint - Unload.

Image_5327_1744725448204

Every time this endpoint is called, it throws 401 Unauthorized. All the different endpoint behaves as expected. In the attachments you can find an example of what's happening when clicking the Save button in the Organize Pages view.

The problem is that cookie is not attached to the Unload requests. CORS settings are checked, and everything else is working without any problem. I'm using 28.2.12 version of pdf viewer and angular 13. I can also observe the same issue on the newest version of pdf viewer.


Attachment: Requests_3eb57a33.png

1 Reply

PA Priyadharshini Annamalai Syncfusion Team April 16, 2025 07:46 AM UTC

Hi


To resolve the issue of cookies not being attached to the Unload request, you can set the withCredentials property to true in the ajaxRequestSettings of the PDF Viewer. This ensures that cookies are included with the request, allowing authentication to function correctly. Once this property is enabled, the cookies will appear in the Headers tab of the Unload request, and the expected data will be visible in the Response tab.


Regards,

Priyadharshini


Loader.
Up arrow icon