azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
3.45k stars 119 forks source link

[FEAT]: Offer an option to drop the connection if the site doesn't exist #291

Open shootlazer opened 2 months ago

shootlazer commented 2 months ago

Feature Description

I don't quite like the idea of letting everyone know what I'm running if for some reason the page doesn't exist.

So, instead of showing HTTP Error 400 and

Bad Request: Invalid hostname. Use your domain instead of your IP to access your server. Check logs if more details are needed.

There could be an option to just not send anything.

For example, Nginx proxy manager has an option to show Error 444 or a custom 404 page

InterN0te commented 1 week ago

Or it could be a default route for all unwanted requests to a particular server (an awesome-honeypots or docker-rickroll for example)

A choice like for a route with an additional option to drop the connection would be ideal for any unused domains instead of the default "Bad Request" response