Skip to content

Commit

Permalink
Merge pull request #1 from thoop/patch-1
Browse files Browse the repository at this point in the history
Adding facebook crawler user agent and more extensions to ignore
  • Loading branch information
bakura10 committed Oct 12, 2013
2 parents a375d1c + ebbc6eb commit 2918d0b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
40 changes: 35 additions & 5 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,47 @@
'googlebot',
'yahoo',
'bingbot',
'baiduspider'
'baiduspider',
'facebookexternalhit'
),

// Ignored extensions
'ignored_extensions' => array(
'.css',
'.gif',
'.jpeg',
'.jpg',
'.js',
'.css',
'.less',
'.png',
'.jpg',
'.jpeg',
'.gif',
'.pdf',
'.doc',
'.txt',
'.zip',
'.mp3',
'.rar',
'.exe',
'.wmv',
'.doc',
'.avi',
'.ppt',
'.mpg',
'.mpeg',
'.tif',
'.wav',
'.mov',
'.psd',
'.ai',
'.xls',
'.mp4',
'.m4a',
'.swf',
'.dat',
'.dmg',
'.iso',
'.flv',
'.m4v',
'.torrent'
),

// Whitelist and blacklist
Expand Down
3 changes: 1 addition & 2 deletions tests/ZfrPrerenderTest/Factory/ModuleOptionsFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ public function testCanCreateOptions()

$this->assertInstanceOf('ZfrPrerender\Options\ModuleOptions', $options);
$this->assertEquals('http://prerender.herokuapp.com', $options->getPrerenderUrl());
$this->assertEquals(array('googlebot', 'yahoo', 'bingbot', 'baiduspider'), $options->getCrawlerUserAgents());
$this->assertEquals(array('.css', '.gif', '.jpeg', '.jpg', '.js', '.png'), $options->getIgnoredExtensions());
$this->assertEquals(array('googlebot', 'yahoo', 'bingbot', 'baiduspider', 'facebookexternalhit'), $options->getCrawlerUserAgents());
$this->assertEmpty($options->getWhitelistUrls());
$this->assertEmpty($options->getBlacklistUrls());
}
Expand Down

0 comments on commit 2918d0b

Please sign in to comment.