Caddy反代自动https配置

/ 技术收藏 / 没有评论 / 686浏览

淘宝客反代配置-跳转

xxx.com {
    tls 21371218@gmail.com
    gzip
    timeouts none
    header / Strict-Transport-Security "max-age=31536000;"
    redir  302 {
      if {>User-agent} has Mobile 
        if {path} is /
          https://xxx.com/index.php?r=index/wap
    }
    proxy / 127.0.0.1:7261 {
    }
}

单ws反代

xxx.com {
    tls 7517281@gmail.com
    gzip
    timeouts none
    header / Strict-Transport-Security "max-age=31536000;"
    proxy / https://xxx.com {
        except /ok.htm
    }
    proxy /ok.htm 127.0.0.1:5214{
        without /ok.htm
        websocket
    }
}
import sites/*

网站反代

xxx.xxx.com {
    tls 324318@gmail.com
    gzip
    timeouts none
    header / Strict-Transport-Security "max-age=31536000;"
    proxy / http://xxx.xxx.com:3231{
    }
}