Feature: use proxy service to render PDF
Closed this issue · 0 comments
Already implemented with 526bc48
Documenting the use case: lots of iTop users rely on a typical webhost where they only have access to a PHP server and database, but where they can not install the necessary dependencies to generate PDFs using Spatie's BrowserShot.
This commit introduces a pdf_renderer
setting, which defaults to browsershot
(as previously implemented); but it can also be set to external
, in which case the output of the report is base64 encoded and sent to the proxy service URL configured in pdf_renderer_external
section (which has a url
setting pointing to the service URL, and a skip_certificate_check
boolean to allow self-signed certs).
Quite some refactoring is done to optimize for this situation.
Mind that some webhosts also restrict outgoing traffic altogether or to atypical ports.
Real world use case: iTop environment hosted on One.com servers. Outgoing traffic seems to be needed on a typical port (443).