* ``enabled``: Whether the managed content security policy is enabled
* ``sts``: Whether to additionally send a `Strict-Transport-Security` header
* ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent
+* ``ct_max_age``: The maximum age for the `Except-CT` header if sent
end
defp maybe_send_sts_header(conn, true) do
- max_age = Config.get([:csp, :sts_max_age])
+ max_age_sts = Config.get([:csp, :sts_max_age])
+ max_age_ct = Config.get([:csp, :ct_max_age])
merge_resp_headers(conn, [
- {"strict-transport-security", "max-age=#{max_age}; includeSubDomains"}
+ {"strict-transport-security", "max-age=#{max_age_sts}; includeSubDomains"},
+ {"expect-ct", "enforce, max-age=#{max_age_ct}"}
])
end