Mitigate BREACH attacks in Thruster
mainThruster provides two mechanisms to protect against the BREACH attack, which targets secrets in compressed, encrypted traffic:
- Random Jitter (Default): Thruster adds random padding to the size of compressed responses. This is controlled by the
GZIP_COMPRESSION_JITTERenvironment variable (default is32bytes). Setting this to0disables jitter. - Compression Guard (Recommended for high security): You can disable compression entirely for requests that contain sensitive authentication headers (
Cookie,Authorization, orX-Csrf-Token). This eliminates the side-channel for sensitive traffic.
To enable the Compression Guard, set:
GZIP_COMPRESSION_DISABLE_ON_AUTH=true