What is a reliable method to record votes from anonymous users, without allowing duplicates

前端 未结 8 1985
广开言路
广开言路 2021-01-30 11:16

First of all, I searched as best I could and read all SO questions that seem relevant, but nothing specifically answered this. This is not a duplicate, afaik.

Obviously

8条回答
  •  长发绾君心
    2021-01-30 11:38

    Use a persistent cookie to allow only one vote per item

    and record the IP, if there are more than 100 (1,000? 10,000?) requests in less than X mins then "soft block" the IP

    The "soft block": dont show a page saying "your IP has been blocked" but show your "thank you for your vote" page and DONT record the vote in your DB. You even can increase the counter for that IP only. You want to prevent them to know that you are blocking their IP.

提交回复
热议问题