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

The last comma in `include ./referral-spam.caddy;` might not be supported #132

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi, Thank you Stevie for this amazing solution !

Just wanted to point that with the comma I have an error and without the comma it works fine (or at least it doesn't break, because I did not test a referral link I cannot tell for sure).

Also see this discussion They are talking about import rather than include so could you please confirm which one to use here ?

Thanks again,

ghost commented 2 years ago

OK, Now that I removed comma and that Caddyfile is not crushing, I found it is complaining about the file not being found (using docker, so having a hard time copying the referral-spam.caddy file to the new volume).

So what I did is to copy its content and past it directly in the Caddyfile, and now I find another error complaining about:

unrecognized directive: if_op.

ghost commented 2 years ago

my bad, I should have imported the file inside the domain namespace. So that was a Caddy config issue on my side.