Stevie-Ray / referrer-spam-blocker

Apache, Nginx, IIS, uWSGI, Caddy & Varnish blacklist + Google Analytics segments to prevent referrer spam traffic 🤖
MIT License
374 stars 86 forks source link

Different approach for file splitting in a loop #113

Closed daugsbi closed 7 years ago

daugsbi commented 7 years ago

111 with multiple files.

It splits the regex expression as close to the google limit as possible and in the last run it takes the rest. So it is not equally distributed.

Your last approach splitted the file into equal parts, but this didn't work correctly. I assume because the variable eachFile wasn't updated in the loop according to the searched pipe in each part of the string.

Maybe you would like to correct your solution or check if you also like my approach.

Ubuntu101 commented 7 years ago

Tested and working ... @daugsbi you nailed it !!! Creates all parts, no breaking of domain names. @daugsbi you BEAUT !!!!

screen shot 2017-03-03 at 10 32 29 am