Search code examples
flaskrefreshpageload

Enabling flood protection for correct calculation of hotness score


I have a flask app that calculates the hotness score for blog posts. However the app is susceptible to calculating wrong scores in case someone continuously refreshes a page through a script. How do I prevent this?

P.S.-New to everything. So please keep the lingo a bit basic. Thanks.


Solution

  • Try using cookies they store client data or introduce logins then use decorators.