rancher traefik 如何设置 http自动跳转https

rancher traefik 如何设置 http自动跳转https
已邀请:
社区版traefik是支持重定向的,查看镜像构建文件中有这个逻辑:
elif [ "${TRAEFIK_HTTPS_ENABLE}" == "only" ]; then
    TRAEFIK_ENTRYPOINTS_HTTP=$TRAEFIK_ENTRYPOINTS_HTTP"\
    [entryPoints.http.redirect]
       entryPoint = \"https\"
 
TRAEFIK_HTTPS_ENABLE 变量等于 only 就可以。
https://github.com/rawmind0/alpine-traefik/blob/3c60843cf398bcdbfd3161a196ef31bd38890a99/root/opt/traefik/bin/traefik.toml.sh#L269
 

要回复问题请先登录注册