Skip to content

Use built-in HSTS options for traefik #339

@spizacode

Description

@spizacode

Traefik has dedicated options for setting the Strict-Transport-Security Header. Traefik's Headers middleware has the options stsSeconds, stsIncludeSubdomains and stsPreload. (Documentation: https://doc.traefik.io/traefik/reference/routing-configuration/http/middlewares/headers/). I think I would be more appropriate to use the built-in tools provided in the Treafik configuration, instead of just adding a custom header entry. When I was looking for examples for configuring HSTS in Traefik I saw almost exclusively examples using these instead of the custom header approach suggested by ssl-config-generator. I have checked in the Traefik repository that these options were already available in the v2.0.0 release. I will open a PR to use these options in the >= 2.0.0 side of traefik config generator, so you can decide if you want to adopt this change or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions