HSTS configuration 1051 error

I’m trying to extend the validity of my HSTS header, and I’m getting a 1051 error.

% curl -X PATCH "https://api.cloudflare.com/client/v4/zones/[zone]/settings/security_header" \
 -H "X-Auth-Email: [email]" \
 -H "X-Auth-Key: [key]" \
 -H "Content-Type: application/json" \
 --data '{ "strict_transport_security":{ "enabled":true, "max_age":315569520, "include_subdomains":true, "nosniff":true } }'

This error is not even listed on the official 1XXX Errors list:

Would be awesome if you could post a screenshot aswell

I’m not sure the screenshot really gives any more information.

1 Like

Yeah but it shows that the Error might not be related to HSTS itself but to the wrong Zone you selected.
Pls check the Zone as “Invalid value for zone setting” leads to having selected the wrong or a invalide one

I copied that URL directly from the Dash, but I just re-copied it to be sure. Same error, though.

This topic was automatically closed after 30 days. New replies are no longer allowed.