Today, we are proud to introduce Vapor's managed firewalls for basic protection against denial-of-service attacks targeting your environment, as well as protection against pervasive bot traffic that can consume your environment's resources. You may start using Vapor's managed firewall by defining the firewall configuration option within your application's vapor.yml file: When using the rate-limit option, Vapor's managed firewall tracks the rate of requests for each originating IP address and blocks IPs with request rates over the given rate-limit value. In the example above, if the request count for an IP address exceeds 1,000 requests in any 5-minute time span then the firewall will temporarily block requests from that IP address with the 403 Forbidden HTTP status code. When using the bot-control option, Vapor's managed firewall blocks requests from pervasive bots, such as scrapers or search engines.
Be sure to check out Vapor's managed firewall documentation before you begin using this feature.