diff --git a/.gitignore b/.gitignore index 4ef46da..3479db1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .Build .php_cs.cache Documentation-GENERATED-temp +regex.txt \ No newline at end of file diff --git a/Classes/Middleware/RedirectionMiddleware.php b/Classes/Middleware/RedirectionMiddleware.php index 7662bda..d6858ce 100644 --- a/Classes/Middleware/RedirectionMiddleware.php +++ b/Classes/Middleware/RedirectionMiddleware.php @@ -26,7 +26,7 @@ class RedirectionMiddleware implements MiddlewareInterface /** * @var string */ - protected $botPattern = '/bot|google|baidu|bing|msn|teoma|slurp|yandex|Chrome-Lighthouse/i'; + protected $botPattern = '#(360Spider)|(Aboundex)|(AcoonBot)|(AddThis\.com)|(AhrefsBot)|(ia_archiver|alexabot|verifybot)|(alexa site audit)|(Amazonbot)|(Amazon[ -]Route ?53[ -]Health[ -]Check[ -]Service)|(AmorankSpider)|(ApacheBench)|(Applebot)|(AppSignalBot)|(Arachni)|(AspiegelBot)|(Castro 2, Episode Duration Lookup)|(Curious George)|(archive\.org_bot|special_archiver)|(Ask Jeeves/Teoma)|(Backlink-Check\.de)|(BacklinkCrawler)|(Baidu.*spider|baidu Transcoder)|(BazQux)|(Better Uptime Bot)|(MSNBot|msrbot|bingbot|BingPreview|msnbot-(UDiscovery|NewsBlogs)|adidxbot)|(Blekkobot)|(BLEXBot)|(Bloglovin)|(Blogtrottr)|(BoardReader Blog Indexer)|(BountiiBot)|(Browsershots)|(BUbiNG)|((? regex.txt`, regex.txt is added as gitignore. diff --git a/Scripts/yamlToRegex.php b/Scripts/yamlToRegex.php new file mode 100644 index 0000000..d6547e5 --- /dev/null +++ b/Scripts/yamlToRegex.php @@ -0,0 +1,44 @@ +parse(); \ No newline at end of file diff --git a/composer.json b/composer.json index 2ea88ab..d0bb94c 100644 --- a/composer.json +++ b/composer.json @@ -47,5 +47,10 @@ }, "suggest": { "typo3/cms-scheduler": "*" + }, + "scripts": { + "regex:create": [ + "@php Scripts/yamlToRegex.php" + ] } }