BREACH is one of the commonly seen vulnerabilities in all types of web servers.
In the Ngnix server there are multiple fixes available but choosing the appropriate mitigation technique is challenging
Disabling compression HTTP compression and gzip filter module is the best solution to mitigate this vulnerability this will completely eliminate the side-channel attack.
Below are the steps to make the configurations in the Nginx serverGoto Default configuration path for Ngnix (/etc/ngnix/ngnix.conf )
below fix should be added
if ($scheme = https) {gzip off;}
Gzip/compression should be turned off on application-level majorly, this should be turned off manually on Application-level if we are using any framework over core technology. Ex: Sails js
Note: Though the above solution provides a permanent fix for the Breach attack, still without gzip compression config the server will expect performance degradation.
cool