How to stop unnecessery requests to my app?
I developed locally a very simple app, which takes webhooks from twitch.tv and sends messages to a Discord server. Few months ago, this app was written in php and hosted on a shared hosting provider. But recently I decided to redo it, this time in node.js and host it on DO.
So before, on the shared hosting account I could see logs of all my visitors. And they would be exactly what I expect - only a few requests per day, coming from a twitch IP and sometimes google bots. On this new node.js app, I implemented morgan logging and as soon as the app started running, my logs started filling with http requests from China. Multiple requests every hour. It basically defeats the purpose of my app having a logging feature. And I really would have liked it to be able to browse my logs to see in detail what info is passing through my app.
So, what are my options here? Should I use some kind of IP blocker? (I am student and would like to use a free solution)
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.