filamentgroup / grunt-criticalcss

Grunt wrapper for criticalcss
MIT License
530 stars 27 forks source link

Use --ignore-ssl-errors=yes for local secure sites #14

Closed ghost closed 9 years ago

ghost commented 9 years ago

When trying to use this on my local secure site, Phantom JS gives the following error:

Fatal error: PHANTOM ERROR: Error: Page didn't open: https://theindividualagency.local TRACE: -> /Users/keironlowe/Development/The Individual Agency/theindividualagency.co.uk/node_modules/grunt-criticalcss/node_modules/criticalcss/lib/criticalrunner.js: 61 -> :/modules/webpage.js: 281PhantomJS has crashed. Please read the crash reporting guide at https://github.com/ariya/phantomjs/wiki/Crash-Reporting and file a bug report at https://github.com/ariya/phantomjs/issues/new with the crash dump file attached: /tmp/E494F362-367B-4622-A15A-FBCB2151DF75.dmp

I believe this is due to the fact that the ssl certificate from Mamp Pro is self signed, and gives an SSL error when you first visit the site. Looking at this stack overflow post, it can be fixed by adding the --ignore-ssl-errors=yes flag when calling Phantom.

jefflembeck commented 9 years ago

This change is added for grunt-criticalcss 0.4.3