【发布时间】:2021-02-06 14:40:01
【问题描述】:
我正在使用 traefik 以及从 http 到 https 的全局重定向,在 docker-compose 文件中使用此命令
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
效果很好。
现在,是否有可能使这个全局重定向基于规则?我想重定向从 http 到 https 的所有流量,但是如果提供了特定的标头或请求来了从特定 IP,重定向应该不会发生。
【问题讨论】: