Solves https://gitlab.com/gitlab-org/gitlab-services/design.gitlab.com/-/issues/716
This is based on the example at https://www.nginx.com/blog/http-strict-transport-security-hsts-and-nginx/#:~:text=Setting%20the%20Strict%20Transport%20Security,including%20internally%20generated%20error%20responses.