My Caddyfile this:
header / {
# Enable HTTP Strict Transport Security (HSTS) to force clients to always
# connect via HTTPS (do not use if only testing)
Strict-Transport-Security "max-age=31536000;"
# Enable cross-site filter (XSS) and tell browser to block detected attacks
X-XSS-Protection "1; mode=block"
# Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
X-Content-Type-Options "nosniff"
# Disallow the site to be rendered within a frame (clickjacking protection)
X-Frame-Options "DENY"
-Server
}
my.domain{
proxy / backend_ip:80
}
In bash i see this error:
Caddyfile:4 - Error during parsing: Unknown directive ‘Strict-Transport-Security’
I try this:
my.domain{
proxy / backend_ip:80
}
header / {
# Enable HTTP Strict Transport Security (HSTS) to force clients to always
# connect via HTTPS (do not use if only testing)
Strict-Transport-Security "max-age=31536000;"
# Enable cross-site filter (XSS) and tell browser to block detected attacks
X-XSS-Protection "1; mode=block"
# Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
X-Content-Type-Options "nosniff"
# Disallow the site to be rendered within a frame (clickjacking protection)
X-Frame-Options "DENY"
-Server
}
Bash also again send error:
Caddyfile:7 - Error during parsing: Unknown directive ‘Strict-Transport-Security’
Install caddy from this command line:
curl https://getcaddy.com | bash -s personal hook.service,http.cache,http.cors,http.expires,http.filebrowser,http.filter,http.forwardproxy,http.geoip,http.ipfilter,http.locale,http.login,http.minify,http.nobots,http.proxyprotocol,http.ratelimit,http.realip,http.reauth,http.restic,http.s3browser,http.supervisor,http.upload,supervisor
Please help!