i think it is a potential bug that cerbot will modify nginx configuration files with a 301 for the redirect from http to https, as in this example:
if ($host = foo.example.org) {
return 301 https://$host$request_uri;
} # managed by Certbot
i feel as though a 308 would be better suited for this, as a 301 will lose the body of a POST when it redirects. this was causing a problem on our server as this (automatically placed) 301 block superceded the 308 we had in place to handle POST bodies.