HSTS max-age not effective/no update in Nginx
Solution 1:
Cloudflare is the TLS terminating endpoint that rest of the world sees. Therefore it sets the HSTS headers. The origin HSTS headers are ignored by Cloudflare.
You need to modify the HSTS settings in Cloudflare control panel.