How to enable HTTP Strict Transport Security

Hi,

I tried to enable HSTS on my Keycloak server using both steps below, but it didn’t seem to work for this link "https://KeycloakHostname:9043/auth/realms/MyCustomRealm/login-actions/authenticate.". I just wonder if I missed any other steps?

  1. Realm Settings -> login -> Require SSL -> all requests

/subsystem=undertow/configuration=filter/response-header=hsts-header:add(header-name=“Strict-Transport-Security”,header-value=“max-age=31536000;”)
/subsystem=undertow/server=default-server/host=default-host/filter-ref=hsts-header:add

Thanks,
Quoc