stats4sd / aec_portfolio

A proof of concept for the AEC Consortium Project Management / Assessment System
GNU General Public License v3.0
0 stars 0 forks source link

browsershot-test: url instead of html #137

Closed dave-mills closed 1 year ago

dave-mills commented 1 year ago

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.