Firewall

Apiker can interact with the Cloudflare Firewall to prevent endpoint flooding.

To enable it, set the firewall option to true or pass an object such as the following:

The firewall option requires that you specify a Cloudflare Token with Firewall permissions in the .env. Please follow the guide on how to create API tokens.

Example (in your .env file):

Notes:

  • You can use the Firewall Banning and Unbanning handlers in your application at will. Just import the Firewall methods that are exported from the apiker package.