m2c
m2c copied to clipboard
nginx 502 issue caused by Magento SCP plugin large headers
Hi,
We are using m2c version v0.10.5. Magento 2.3.5 and later contains SCP plugin which generates extremely large headers which leads to 502 Bad Gateway issue "…upstream sent too big header while reading response header from upstream...". The workaround is to disable SCP plugin but fix would be welcome.
nginx image should be updated with something like:
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
https://github.com/flancer32/mage2_ext_csp
Module to collect CSP violations reports and convert it to the CSP rules. Works like a charm for me in 2.3.5-p1 and 2.4.1.