Traefik

Redirect loops occur when Authelia precedes CrowdSec in middleware chain

critical
configurationUpdated Jan 9, 2026(via Exa)
Technologies:
How to detect:

When middleware order places Authelia before CrowdSec, redirect loops occur. Authelia redirects unauthenticated users to login portal, CrowdSec treats the redirect as a new request and injects its own redirect (e.g., for captcha challenges), and Traefik attempts to honor both redirects causing the request to collapse.

Recommended action:

Do not reverse middleware order to put Authelia first when chaining with CrowdSec. The proper solution is to separate layers entirely: move CrowdSec to network/firewall level and keep only Authelia as Traefik middleware.