最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

spring boot - Avoiding the SPAM while sending a specific request using Java or SpringBoot - Stack Overflow

programmeradmin2浏览0评论

just a quick question in order to get some idea of what are the standards and what can be implemented.

AS-IS: I have a webpage with a button. When I click on a button a request gets sent : A POST request and I return a json with a message : Request sent

If I click again the button I send the request again.

TODO : I click on the button and the request gets sent. the json shows me : Request sent If I click again I get a 429 not a 200 and the json says : You already did the request please wait 5 minutes.

My question is :

Is there any any spam standard method to do so or I just have to come up with my own fix like implementing some ConcurrentHashMap or use cache or check the time and based on that return a different http response with a different body ?

Hope the question makes sense.

Thx in advance for all the ideas and help.

Wish you a good day.

发布评论

评论列表(0)

  1. 暂无评论