fix: temporarily disable brute force IP protection
Disable all IP blocking and 404 tracking to allow unrestricted access while we review and tune ban thresholds and exemptions. This is a temporary measure to prevent legitimate traffic from being blocked. Will re-enable after proper configuration.
This commit is contained in:
parent
94bc755dd8
commit
74173dad0b
1 changed files with 19 additions and 15 deletions
|
|
@ -38,23 +38,27 @@ defmodule ToweropsWeb.Plugs.BruteForceProtection do
|
|||
def init(opts), do: opts
|
||||
|
||||
def call(conn, _opts) do
|
||||
# Exempt agent WebSocket connections - they authenticate at channel join
|
||||
if agent_websocket?(conn) do
|
||||
conn
|
||||
else
|
||||
ip_address = get_remote_ip(conn)
|
||||
# TEMPORARILY DISABLED - brute force protection bypassed
|
||||
# Re-enable after reviewing ban thresholds and exemptions
|
||||
conn
|
||||
|
||||
# Check whitelist and ban status before routing
|
||||
conn = check_and_block(conn, ip_address)
|
||||
# # Exempt agent WebSocket connections - they authenticate at channel join
|
||||
# if agent_websocket?(conn) do
|
||||
# conn
|
||||
# else
|
||||
# ip_address = get_remote_ip(conn)
|
||||
|
||||
# Only register 404 tracking if we didn't already halt the request
|
||||
# (halted requests have already been sent, can't register before_send)
|
||||
if conn.halted do
|
||||
conn
|
||||
else
|
||||
maybe_track_404(conn, ip_address)
|
||||
end
|
||||
end
|
||||
# # Check whitelist and ban status before routing
|
||||
# conn = check_and_block(conn, ip_address)
|
||||
|
||||
# # Only register 404 tracking if we didn't already halt the request
|
||||
# # (halted requests have already been sent, can't register before_send)
|
||||
# if conn.halted do
|
||||
# conn
|
||||
# else
|
||||
# maybe_track_404(conn, ip_address)
|
||||
# end
|
||||
# end
|
||||
end
|
||||
|
||||
defp agent_websocket?(conn) do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue