I am developing a Web Application using WebApi
and AngularJS
. My Application is Public Classified Web Site where a lot of URLs are public. My Question : What if someone writes very simple infinite loop and starts hitting my Server like:
<script type="text/javascript">
$(function () {
while (true) {
$.get("https://MyPublicURL", function (data) {
});
};
});
</script>
It will make my expensive server serve unnecessary requests for no reason. What are the best practices to avoid such situation?