javascript - How to Handle Infinite hits to your public url -


i developing web application using webapi , angularjs. application public classified web site lot of urls public. question : if writes simple infinite loop , starts hitting server like:

<script type="text/javascript">      $(function () {          while (true) {             $.get("https://mypublicurl", function (data) {             });         };     });  </script> 

it make expensive server serve unnecessary requests no reason. best practices avoid such situation?

there services can use mitigate dos attacks, 1 of known , easy start cloudflare: https://www.cloudflare.com/ddos/

the basic tier free , affords protection, can try out , see if suits you.

there things can mitigate simple attacks such 1 in example, more complicated attacks (ddos etc) need handled outside.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -