類似 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
 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 helloworld 的頭像
    helloworld

    Hello World

    helloworld 發表在 痞客邦 留言(0) 人氣()