Firewall
INEX SPA - Firewall System Documentation
π Feature: Firewall Protection
The Firewall system in INEX SPA helps protect your application from malicious access, unwanted bots, and rate abuse. It is a lightweight, file-based rule checker that runs before the main application loads.
π οΈ Enable the Firewall
To enable the Firewall system, open your .env file and set the following:
USE_FIREWALL=trueOnce enabled, you can use the Firewall system manually by calling the Firewall class directly.
π Files and Structure
Firewall Rules File:
/Json/firewall.jsonFirewall Class:
/core/functions/PHP/classes/Firewall.php
βοΈ How It Works
INEX SPA loads the rules from
/Json/firewall.json.You can manually check requests using the static method:
The function compares the visitor's IP or user-agent against the rule list.
If a match is found, the request is blocked with a 403 error.
π firewall.json Example
block_ips: IP addresses to block.block_user_agents: Partial or full matches of bad user-agents.redirect_blocked_to: Page will redirect if blocked
π‘ Future versions may include rate limiting and temporary bans.
β Important Notes
The firewall only runs if
USE_FIREWALL=trueis set in.env.Country blocking uses a simple IP-to-country detection. Make sure the IP location file is available if needed.
For full control, you can extend the
Firewall.phpclass.
β
Status
β Lightweight β Easy to configure β Extensible β No external libraries
Β© INEX SPA Team - Firewall System
Last updated