How do i turn of HSTS

Hello,

I have a question regarding provisioning. I am working on provisioning Ubuntu on a Dell server using Foreman, but I ran into an issue while testing the link to fetch the vmlinuz file. I keep receiving the following error:

root@foreman:~# wget http://foreman.example.be/pub/installation_media/ubuntu-22.04/casper/vmlinuz
URL transformed to HTTPS due to an HSTS policy
–2025-03-19 14:42:40-- https://foreman.example.be/pub/installation_media/ubuntu-22.04/casper/vmlinuz
Resolving foreman.example.be (foreman.example.be)… 10.10.100.1
Connecting to foreman.example.be (foreman.example.be)|10.10.100.1|:443… connected.
ERROR: The certificate of ‘foreman.example.be’ is not trusted.
ERROR: The certificate of ‘foreman.example.be’ doesn’t have a known issuer.

I would like to bypass HSTS and not use port 443/HTTPS. How can I configure this so that it uses HTTP instead?

There is a setting you can turn off:

But you really shouldn’t have to do that? The to-deployed machine should not have any HSTS cache, and we don’t redirect http-to-https on those URLs.