Make discourse site won't send content to specific IP (using Plugin or that kind)

(Anna Naumova) #1


I am planning to publish a discourse site. One thing concerns me is that if scraper scrapes the site, then I need to stop sending content to that client’s IP.

I was trying to find a solution with a plugin but couldn’t find a proper one.

So the idea is if the client visits the site more than limited times, the discourse site will stop sending the content to that IP.

Any help will be appreciated. Thanks in advance.

(Bhanu Sharma) #2

DIscourse has rate limits set up. this shouldn’t be a problem.

(Anna Naumova) #3

Thanks, @itsbhanusharma for your reply.

Can you please teach me what is it and how can I use it to prevent scraping script?

(Bhanu Sharma) #4

There is a web.ratelimited.template.yml present in the templates folder which defaults to the following:

reqs_per_second: 12
burst_per_second: 12
reqs_per_minute: 200
burst_per_minute: 100
conn_per_ip: 20

you can make it more restrictive to suit your needs.

(Anna Naumova) #5

Thanks a lot.

It helps me a lot. Thank you again.

(Anna Naumova) #6

And can I change those settings through a plugin javascript?

I am going to stop sending all related to that specific IP.

Is that possible?