HSTS Enable Issue

I have to make HSTS active. The following entries have been added to the rules.toml file, however, they are not active.

[http.middlewares.headers]
BrowserXssFilter = true
ContentTypeNosniff = true
ForceSTSHeader = true
FrameDeny = true
SSLRedirect = true
STSIncludeSubdomains = true
STSPreload = true
STSSeconds = 315360000

[http.middlewares]
[http.middlewares.middleware1.redirectScheme]
scheme = "https"
permanent = true
frameDeny = true
browserXssFilter = true

[http.middlewares]
[http.middlewares.middleware1.redirectScheme]
scheme = "https"
permanent = true
ForceSTSHeader = true
STSPreload = true
TSSeconds = 315360000

[http.middlewares]
[http.middlewares.middleware1.redirectScheme]
scheme = "https"
permanent = true
BrowserXssFilter = true
ContentTypeNosniff = true
ForceSTSHeader = true
FrameDeny = true
SSLRedirect = true
STSIncludeSubdomains = true
STSPreload = true
STSSeconds = 315360000