[Html2PdfConverter] Security Utils error Html2PdfConverter

[Html2PdfConverter] Security Utils error Html2PdfConverter

  
Forge Component
(42)
Published on 23 Jun by Guilherme Pereira
42 votes
Published on 23 Jun by Guilherme Pereira

We have recently begun using the Html2PdfConverter module to generate pdfs in our application. Since then we have noticed an error being generated everytime a pdf is created. 

The error is as follows: The request entity's media type 'application/x-www-form-urlencoded' is not supported for this resource.

This error has no impact on the front end but it is flooding our monitoring logs. We know it is related to the Security settings introduced in platform version 10, but have been unable to pinpoint the exact cause.

Has anyone encountered the same issue and found a solution?

After a platform upgrade to version 10.0.603 the error is now slightly clearer:

Failed to deserialize JSON to CSPReport:
Unrecognized token 'document': was expecting ('true', 'false' or 'null')


As we have not changed anything about the creation of this token, can someone explain how this token is generated and how we can prevent this error from generating?