類似 apache 等 web server 的 rewrite rule 功能
command:
- "........"
- "........"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure" ## force redirect to https
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
- "--entrypoints.websecure.address=:443"
測試
root@lab:/home/lab# curl -I http://lab.pass.tw/testurl
HTTP/1.1 308 Permanent Redirect
Location: https://lab.pass.tw/testurl
Date: Mon, 19 Dec 2022 08:28:03 GMT
Content-Length: 18
Content-Type: text/plain; charset=utf-8
全站熱搜