Redirect or block visitors based on country

Hello, I’m running a white label self-hosted V5 instance and I need to redirect or block visitors from a certain country. I’m in a shared hosting environment with no access to apache’s geoip module.

Som I’m thinking of using this PHP Geolocation Class

I only have a basic programming knowledge and reading the invoice ninja code I couldn’t find out in what file / files I should invoke this class.

Can someone help me, please


@david can you please advise?

1 Like

Thank you! Nice piece of software btw. I did an excellent review on G2 because I really like it :smiling_face_with_three_hearts: .

1 Like

Thank you, it’s a big help to us!

1 Like


I would geo block at the edge using a service like Cloudflare that can provide you a proper WAF, this isn’t really the job of the application.