Browsershot was previously not running the JavaScript correctly to produce the chart in the pdf.
A post from back in 2020 suggested that this is an issue with using Browsershot::html(), but it works with Browsershot::url().
So this PR moves to using url(), and adds the needed infrastructure to allow the headless Chrome instance to authenticate via http basic auth. Unfortuantely this means that we can't use the user's own account to authenticate, but given they need to be authenticated to even trigger the browsershot method, I think this is ok.
I've added a TODO item to double check the security of the initiative show info page after these changes.
Browsershot was previously not running the JavaScript correctly to produce the chart in the pdf.
A post from back in 2020 suggested that this is an issue with using
Browsershot::html()
, but it works withBrowsershot::url()
.So this PR moves to using
url()
, and adds the needed infrastructure to allow the headless Chrome instance to authenticate via http basic auth. Unfortuantely this means that we can't use the user's own account to authenticate, but given they need to be authenticated to even trigger the browsershot method, I think this is ok.I've added a TODO item to double check the security of the initiative show info page after these changes.