I have the same issue with 502 Bad Gateway after last update.
This happens after you clear the cache. The first time the page loads, it gives an error 502, but the second load of the page goes fine.
P.S. Just checked with plugin version 3.1.4. There are no problems. The problem starts with version 3.1.6. Version 3.1.7 also causes a 502 error.
Here is the server log for this error:
[error] 32350#32350: *82355822 upstream sent too big header while reading response header from upstream, client: XXX.XXX.XXX.XXX, server: mydomain.com, request: "GET /page HTTP/2.0", upstream: "fastcgi://unix:/var/www/php-fpm/mydomain.sock:", host: "mydomain.com"
Tested the latest version of the plugin on a site that runs on Apache and found no 502 errors.
How can this problem be solved on the last plugin version on sites that run on ngnx?