Fix line break handling in Cloudflare template
authorPaul Buonopane <Zenexer@users.noreply.github.com>
Thu, 12 Aug 2021 17:05:45 +0000 (13:05 -0400)
committerRafael dos Santos Silva <xfalcox@gmail.com>
Sun, 15 Aug 2021 17:40:53 +0000 (14:40 -0300)
commitae5a223074388795e4ea073a162cbf1dc174d392
tree474acd17db5d0e57a702fa9a7be58713bf29ed91
parentf568633bf060c18cc0866b4018842ce9ec9da33a
Fix line break handling in Cloudflare template

Cloudflare's IP list has gone back and forth between including a trailing line break and omitting it.

When a trailing line break was first added in 2015, it resulted in a bug: https://meta.discourse.org/t/issue-with-cloudflare-template/35113

The trailing line break was removed again in 2021: https://meta.discourse.org/t/cloudflare-template-broken-again/200219

This fixes the template so that it will work regardless of extra line breaks.  It will also safely ignore any empty lines that may appear in the files.
templates/cloudflare.template.yml