sibbl / hass-lovelace-kindle-screensaver

This tool generates a png from a Home Assistant Lovelace view, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
MIT License
315 stars 71 forks source link

Ignore self-signed certificates (enhancement) #9

Closed tslpre closed 3 years ago

tslpre commented 3 years ago

Hello, as mentioned in #4 - there is no option to render pages from HA when a self-signed certificate exists. It would be nice to include an extra configuration option that would then trigger the addition of the argument "--ignore-certificate-errors" in the command for chromium.

I've tested by mounting /app on a local folder outside the container with a modified index.js that contains the extra argument and it works.

sibbl commented 3 years ago

I've added the option to set UNSAFE_IGNORE_CERTIFICATE_ERRORS=true and hope this works as expected 👍

tslpre commented 3 years ago

Thank you very much! I've tested this now and I can confirm it's working as expected. With the new option I can confirm that the command now executed contains "--ignore-certificate-errors":

/usr/lib/chromium/chrome --extra-plugin-dir=/usr/lib/nsbrowser/plugins --user-data-dir=/root/.config/chromium --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --enable-blink-features=IdleDetection --headless --hide-scrollbars --mute-audio about:blank --disable-dev-shm-usage --no-sandbox --lang=en --ignore-certificate-errors --remote-debugging-port=0 --user-data-dir=/tmp/puppeteer_dev_chrome_profile-KiPIPm