Skip to content

Commit

Permalink
Merge pull request #6 from techinasia/dev
Browse files Browse the repository at this point in the history
10th September 2018: Hotfix #3
  • Loading branch information
lesterchan authored Sep 10, 2018
2 parents 49f8489 + bc47118 commit d2a56df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
eb init Rendeer -r ap-southeast-1 -p "arn:aws:elasticbeanstalk:ap-southeast-1::platform/Docker running on 64bit Amazon Linux/2.12.2"
eb deploy
eb deploy --timeout 30
fi
workflows:
Expand Down
4 changes: 3 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ const fetchContent = async (pageURL) => {
// Ensure that only whitelisted URLs and GET method is allowed
if (!whitelistRegExp.test(url) || method.toLowerCase() !== 'get' || /^(font|media|websocket|manifest)$/i.test(resourceType)) {
request.abort();
/* Puppeteer 1.8.0 breaks this
} else if (resourceType.toLowerCase() === 'image') {
request.continue({
url: 'data:image/gif;base64,R0lGODlhAQABAID/AP///wAAACwAAAAAAQABAAACAkQBADs=',
});
*/
} else {
request.continue();
}
Expand Down Expand Up @@ -263,7 +265,7 @@ require('http').createServer(async (req, res) => {
res.end(`Oops. Something is wrong.\n\n${message}`);

// Handle websocket not opened error
if (/not opened/i.test(message) && browser) {
if (/not open/i.test(message) && browser) {
console.error('Web socket failed');
try {
// Sometimes it tries to close an already closed browser
Expand Down

0 comments on commit d2a56df

Please sign in to comment.